0% found this document useful (0 votes)
116 views33 pages

Computer Organization

The document provides a history of the development of computers from ancient counting tools like the abacus to modern digital computers. It discusses early mechanical calculating devices like the Pascaline, Napier's Bones, and the Difference Engine. The development of programmable, digital computers is covered from the Mark I through the five generations of computers and their distinguishing technologies like transistors, integrated circuits, and microprocessors. The document also describes different types of computers based on their data handling capabilities as analogue, digital or hybrid, and their size as supercomputers, mainframes or other categories.

Uploaded by

Priya Darshini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views33 pages

Computer Organization

The document provides a history of the development of computers from ancient counting tools like the abacus to modern digital computers. It discusses early mechanical calculating devices like the Pascaline, Napier's Bones, and the Difference Engine. The development of programmable, digital computers is covered from the Mark I through the five generations of computers and their distinguishing technologies like transistors, integrated circuits, and microprocessors. The document also describes different types of computers based on their data handling capabilities as analogue, digital or hybrid, and their size as supercomputers, mainframes or other categories.

Uploaded by

Priya Darshini
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

1

COMPUTER ORGANIZATION
Computer is an electronic device i.e. used to work with information or compute. It is derived
from the Latin word "computare" which means to calculate.

History of Computers
The first counting device was used by the primitive people. They used sticks, stones and bones as
counting tools. As human mind and technology improved with time more computing devices
were developed. Some of the popular computing devices starting with the first to recent ones are
described below;

Abacus
The history of computer begins with the birth of abacus which is believed to be the first
computer. It is said that Chinese invented Abacus around 4,000 years ago.

It was a wooden rack which has metal rods with beads mounted on them. The beads were moved
by the abacus operator according to some rules to perform arithmetic calculations. Abacus is still
used in some countries like China, Russia and Japan. An image of this tool is shown below;

Napier's Bones: It was a manually-operated calculating device which was invented by


John Napier (1550-1617) of Merchiston. In this calculating tool, he used 9 different ivory strips
or bones marked with numbers to multiply and divide. So, the tool became known as "Napier's
Bones. It was also the first machine to use the decimal point.
2

Pascaline
Pascaline is also known as Arithmetic Machine or Adding Machine. It was invented between
1642 and 1644 by a French mathematician-philosopher Biaise Pascal. It is believed that it was
the first mechanical and automatic calculator.

Pascal invented this machine to help his father, a tax accountant. It could only perform addition
and subtraction. It was a wooden box with a series of gears and wheels. When a wheel is rotated
one revolution, it rotates the neighboring wheel. A series of windows is given on the top of the
wheels to read the totals. An image of this tool is shown below;

Stepped Reckoner or Leibnitz wheel


It was developed by a German mathematician-philosopher Gottfried Wilhelm Leibnitz in 1673.
He improved Pascal's invention to develop this machine. It was a digital mechanical calculator
which was called the stepped reckoner as instead of gears it was made of fluted drums. See the
following image;
3

Difference Engine
In the early 1820s, it was designed by Charles Babbage who is known as "Father of Modern
Computer". It was a mechanical computer which could perform simple calculations. It was a
steam driven calculating machine designed to solve tables of numbers like logarithm tables.

Analytical Engine
This calculating machine was also developed by Charles Babbage in 1830. It was a mechanical
computer that used punch-cards as input. It was capable of solving any mathematical problem
and storing information as a permanent memory.

Tabulating Machine
It was invented in 1890, by Herman Hollerith, an American statistician. It was a mechanical
tabulator based on punch cards. It could tabulate statistics and record or sort data or information.
This machine was used in the 1890 U.S. Census. Hollerith also started the Hollerith?s Tabulating
Machine Company which later became International Business Machine (IBM) in 1924.
4

Differential Analyzer
It was the first electronic computer introduced in the United States in 1930. It was an analog
device invented by Vannevar Bush. This machine has vacuum tubes to switch electrical signals
to perform calculations. It could do 25 calculations in few minutes.

Mark I
The next major changes in the history of computer began in 1937 when Howard Aiken planned
to develop a machine that could perform calculations involving large numbers. In 1944, Mark I
computer was built as a partnership between IBM and Harvard. It was the first programmable
digital computer.

Generations of Computers
A generation of computers refers to the specific improvements in computer technology with
time. In 1946, electronic pathways called circuits were developed to perform the counting. It
replaced the gears and other mechanical parts used for counting in previous computing machines.

In each new generation, the circuits became smaller and more advanced than the previous
generation circuits. The miniaturization helped increase the speed, memory and power of
computers. There are five generations of computers which are described below;
5

First Generation Computers


The first generation (1946-1959) computers were slow, huge and expensive. In these computers,
vacuum tubes were used as the basic components of CPU and memory. These computers were
mainly depended on batch operating system and punch cards. Magnetic tape and paper tape were
used as output and input devices in this generation;

Some of the popular first generation computers are;

o ENIAC ( Electronic Numerical Integrator and Computer)


o EDVAC ( Electronic Discrete Variable Automatic Computer)
o UNIVACI( Universal Automatic Computer)
o IBM-701
o IBM-650

Second Generation Computers


The second generation (1959-1965) was the era of the transistor computers. These computers
used transistors which were cheap, compact and consuming less power; it made transistor
computers faster than the first generation computers.

In this generation, magnetic cores were used as the primary memory and magnetic disc and tapes
were used as the secondary storage. Assembly language and programming languages like
COBOL and FORTRAN, and Batch processing and multiprogramming operating systems were
used in these computers.

Some of the popular second generation computers are;

o IBM 1620
o IBM 7094
o CDC 1604
o CDC 3600
o UNIVAC 1108

Third Generation Computers


The third generation computers used integrated circuits (ICs) instead of transistors. A single IC
can pack huge number of transistors which increased the power of a computer and reduced the
cost. The computers also became more reliable, efficient and smaller in size. These generation
computers used remote processing, time-sharing, multi programming as operating system. Also,
the high-level programming languages like FORTRON-II TO IV, COBOL, PASCAL PL/1,
ALGOL-68 were used in this generation.

Some of the popular third generation computers are;


6

o IBM-360 series
o Honeywell-6000 series
o PDP(Personal Data Processor)
o IBM-370/168
o TDC-316

Fourth Generation Computers


The fourth generation (1971-1980) computers used very large scale integrated (VLSI) circuits; a
chip containing millions of transistors and other circuit elements. These chips made this
generation computers more compact, powerful, fast and affordable. These generation computers
used real time, time sharing and distributed operating system. The programming languages like
C, C++, DBASE were also used in this generation.

Some of the popular fourth generation computers are;

o DEC 10
o STAR 1000
o PDP 11
o CRAY-1(Super Computer)
o CRAY-X-MP(Super Computer)

Fifth Generation Computers


In fifth generation (1980-till date) computers, the VLSI technology was replaced with ULSI
(Ultra Large Scale Integration). It made possible the production of microprocessor chips with ten
million electronic components. This generation computers used parallel processing hardware and
AI (Artificial Intelligence) software. The programming languages used in this generation were C,
C++, Java, .Net, etc.

Some of the popular fifth generation computers are;

o Desktop
o Laptop
o NoteBook
o UltraBook
o ChromeBook
7

Types of Computer
We can categorize computer by two ways: data handling capabilities and size.

On the basis of data handling capabilities, the computer is of three types:

o Analogue Computer
o Digital Computer
o Hybrid Computer

1) Analogue Computer

Analogue computers are designed to process the analogue data. Analogue data is continuous data
that changes continuously and cannot have discrete values such as speed, temperature, pressure
and current.

The analogue computers measure the continuous changes in physical quantity and generally
render output as a reading on a dial or scale.

Analogue computers directly accept the data from the measuring device without first converting
it into numbers and codes.

Speedometer and mercury thermometer are examples of analogue computers.

2) Digital Computer

Digital computer is designed to perform calculations and logical operations at high speed. It
accepts the raw data as digits or numbers and processes it with programs stored in its memory to
produce output. All modern computers like laptops and desktops that we use at home or office
are digital computers.

3) Hybrid Computer

Hybrid computer has features of both analogue and digital computer. It is fast like analogue
computer and has memory and accuracy like digital computers. It can process both continuous
and discrete data. So it is widely used in specialized applications where both analogue and digital
data is processed. For example, a processor is used in petrol pumps that converts the
measurements of fuel flow into quantity and price.

On the basis of size, the computer can be of five types:

1) Supercomputer
8

Supercomputers are the biggest and fastest computers. They are designed to process huge
amount of data. A supercomputer can process trillions of instructions in a second. It has
thousands of interconnected processors.

Supercomputers are particularly used in scientific and engineering applications such as weather
forecasting, scientific simulations and nuclear energy research. First supercomputer was
developed by Roger Cray in 1976.

2) Mainframe computer

Mainframe computers are designed to support hundreds or thousands of users simultaneously.


They can support multiple programs at the same time. It means they can execute different
processes simultaneously. These features of mainframe computers make them ideal for big
organizations like banking and telecom sectors, which need to manage and process high volume
of data.

3) Miniframe computer

It is a midsize multiprocessing computer. It consists of two or more processors and can support 4
to 200 users at one time. Miniframe computers are used in institutes and departments for the
tasks such as billing, accounting and inventory management.

4) Workstation

Workstation is a single user computer that is designed for technical or scientific applications. It
has faster microprocessor, large amount of RAM and high speed graphic adapters. It generally
performs a specific job with great expertise; accordingly, they are of different types such as
graphics workstation, music workstation and engineering design workstation.

5) Microcomputer

Microcomputer is also known as personal computer. It is a general purpose computer that is


designed for individual use. It has a microprocessor as a central processing unit, memory, storage
area, input unit and output unit. Laptops and desktop computers are examples of
microcomputers.
9

Computer Components
There are 5 main computer components that are given below:

o Input Devices
o CPU
o Output Devices
o Primary Memory
o Secondary Memory

The operations of computer components are given below:

1) Inputting: It is the process of entering raw data, instructions and information into the
computer. It is performed with the help of input devices.

2) Storing: The computer has primary memory and secondary storage to store data and
instructions. It stores the data before sending it to CPU for processing and also stores the
processed data before displaying it as output.

3) Processing: It is the process of converting the raw data into useful information. This process
is performed by the CPU of the computer. It takes the raw data from storage, processes it and
then sends back the processed data to storage.

4) Outputting: It is the process of presenting the processed data through output devices like
monitor, printer and speakers.

5) Controlling: This operation is performed by the control unit that is part of CPU. The control
unit ensures that all basic operations are executed in a right manner and sequence.
10

next →← prev
Input Devices
Input device enables the user to send data, information, or control signals to a computer. The
Central Processing Unit (CPU) of a computer receives the input and processes it to produce
the output.

Some of the popular input devices are:

1. Keyboard
2. Mouse
3. Scanner
4. Joystick
5. Light Pen
6. Digitizer
7. Microphone
8. Magnetic Ink Character Recognition (MICR)
9. Optical Character Reader (OCR)

Output Devices
The output device displays the result of the processing of raw data that is entered in the computer
through an input device. There are a number of output devices that display output in different
ways such as text, images, hard copies, and audio or video.

Some of the popular output devices are:

1. Monitor
o CRT Monitor
o LCD Monitor
o LED Monitor
o Plasma Monitor
2. Printer
o Impact Printers
A. Character Printers
i. Dot Matrix printers
ii. Daisy Wheel printers
B. Line printers
i. Drum printers
ii. Chain printers
o Non-impact printers
A. Laser printers
11

B. Inkjet printers
3. Projector

Central Processing Unit (CPU)


Central processing unit carries out all important functions of a computer. It receives instructions
from both the hardware and active software and produces output accordingly. It is also called
processer, central processor and microprocessor. It stores all important programs like operating
system and application software. It also helps Input and output devices to communicate with
each other.

Generally, a CPU has three components:

o ALU (Arithmetic Logic Unit)


o Control Unit
o Memory or Storage Unit

Memory: It is called Random access memory (RAM). It temporarily stores data, programs and
intermediate and final results of processing.

Control Unit: It controls and coordinates the functioning of all parts of computer. It does not
involve in processing and storing data.

ALU: It performs arithmetic and logical functions. Arithmetic functions include addition,
subtraction, multiplication and division. Logical functions mainly include selecting, comparing
and merging the data.
12

Hardware
All tangible physical components of computer and the devices connected to it are hardware.
Some of the popular examples of computer hardware are CPU, motherboard, monitor, mouse and
keyboard.

Software
It is a set of programs that enables the hardware to perform a specific task. All the programs that
run the computer are software. Software is of two types; system software and application
software.

1) System Software

System software is the main software that runs the computer. When you turn on the computer it
activates the hardware and controls and coordinates their functioning. The application programs
are also controlled by system software. Operating system is an example of system software.

Operating System

Operating system is the system software that works as an interface to enable the user
communicate with the computer. It manages and coordinates the functioning of hardware and
software of the computer. The commonly used operating systems are Microsoft Windows, Linux
and Apple Mac OS X

2) Application Software

Applications software is a set of programs designed to perform a specific task. It does not control
or coordinate the working of computer. A computer can run without application software.
Application software can be easily installed or uninstalled as required. Microsoft Office Suite,
Adobe Photoshop and any other software like payroll software or income tax software are
application software.

Types of computer memory (RAM and ROM)


Memory is the most essential element of a computing system because without it computer can’t
perform simple tasks. Computer memory is of two basic type – Primary memory / Volatile
memory and Secondary memory / non-volatile memory. Random Access Memory (RAM) is
volatile memory and Read Only Memory (ROM) is non-volatile memory.
13

1. Random Access Memory (RAM) –


 It is also called as read write memory or the main memory or the primary memory.
 The programs and data that the CPU requires during execution of a program are stored in
this memory.
 It is a volatile memory as the data loses when the power is turned off.
 RAM is further classified into two types- SRAM (Static Random Access
Memory) and DRAM (Dynamic Random Access Memory).
14

2. Read Only Memory (ROM) –


 Stores crucial information essential to operate the system, like the program essential to boot
the computer.
 It is not volatile.
 Always retains its data.
 Used in embedded systems or where the programming needs no change.
 Used in calculators and peripheral devices.
 ROM is further classified into 4 types- ROM, PROM, EPROM, and EEPROM.
Types of Read Only Memory (ROM) –
1. PROM (Programmable read-only memory) – It can be programmed by user. Once
programmed, the data and instructions in it cannot be changed.
2. EPROM (Erasable Programmable read only memory) – It can be reprogrammed. To
erase data from it, expose it to ultra violet light. To reprogram it, erase all the previous data.
3. EEPROM (Electrically erasable programmable read only memory) – The data can be
erased by applying electric field, no need of ultra violet light. We can erase only portions of
the chip.
15

TYPES OF SOFTWARES
System software coordinates the activities and functions of hardware and software, and it
controls the operations of computer hardware. Learn about different types of system software,
including utility software, device drivers and firmware.

System Software
Software is a generic term for an organized collection of computer data and instructions. There
are two types of software: application software and system software. Application software helps
users solve a particular problem or carry out a specific task. A word processor is an example of
application software.
System software coordinates the activities and functions of hardware and software, and it
controls the operations of computer hardware. A computer's operating system is an example of
system software. Operating systems control the computer hardware and act as an interface with
application programs. System software also includes utility software, device drivers and
firmware, which we will be looking at in this lesson.

Utility Software
Utility software helps to manage, maintain and control computer resources. Operating systems
typically contain the necessary tools for this, but separate utility programs can provide improved
functionality. Utility software is often somewhat technical and targeted at users with a solid
knowledge of computers. If you use a computer mostly for e-mail, some Internet browsing and
typing up a report, you may not have much need for these utilities. However, if you are an avid
computer user, these utilities can help make sure your computer stays in tip-top shape.
Examples of utility programs are antivirus software, backup software and disk tools. Let's look at
each of these in a bit more detail.
Antivirus software, as the name suggests, helps to protect a computer system from viruses and
other harmful programs. A computer virus is a computer program that can cause damage to a
computer's software, hardware or data. It is referred to as a virus because it has the capability to
replicate itself and hide inside other computer files.
One of the most common ways to get a virus is to download a file from the Internet. Antivirus
software scans your online activity to make sure you are not downloading infected files. New
viruses are coming out all the time, so antivirus software needs to be updated very frequently.
Backup software helps in the creation of a backup of the files on your computer. Most computer
systems use a hard disk drive for storage. While these are generally very robust, they can fail or
crash, resulting in costly data loss. Backup software helps you copy the most important files to
another storage device, such as an external hard disk. You can also make an exact copy of your
hard disk.
Increasingly, backup software uses cloud storage to create backups. This typically means you
pay a fee to use the storage space of a third party and use their backup software to manage which
files are going to be backed up.
16

Disk tools include a range of different tools to manage hard disk drives and other storage
devices. This includes utilities to scan the hard disks for any potential problems, disk cleaners to
remove any unnecessary files, and disk defragmenters to re-organize file fragments on a hard
disk drive to increase performance. Disk tools are important because a failure of a hard disk
drive can have disastrous consequences. Keeping disks running efficiently is an important part of
overall computer maintenance
17

Memory Hierarchy

In the Computer System Design, Memory Hierarchy is an enhancement to organize the memory
such that it can minimize the access time. The Memory Hierarchy was developed based on a
program behavior known as locality of references.The figure below clearly demonstrates the
different levels of memory hierarchy :

This Memory Hierarchy Design is divided into 2 main types:


1. External Memory or Secondary Memory –
Comprising of Magnetic Disk, Optical Disk, Magnetic Tape i.e. peripheral storage devices
which are accessible by the processor via I/O Module.
2. Internal Memory or Primary Memory –
Comprising of Main Memory, Cache Memory & CPU registers. This is directly accessible
by the processor.
We can infer the following characteristics of Memory Hierarchy Design from above figure:
18

1. Capacity:
It is the global volume of information the memory can store. As we move from top to bottom
in the Hierarchy, the capacity increases.
2. Access Time:
It is the time interval between the read/write request and the availability of the data. As we
move from top to bottom in the Hierarchy, the access time increases.
3. Performance:
Earlier when the computer system was designed without Memory Hierarchy design, the
speed gap increases between the CPU registers and Main Memory due to large difference in
access time. This results in lower performance of the system and thus, enhancement was
required. This enhancement was made in the form of Memory Hierarchy Design because of
which the performance of the system increases. One of the most significant ways to increase
system performance is minimizing how far down the memory hierarchy one has to go to
manipulate data.
4. Cost per bit:
As we move from bottom to top in the Hierarchy, the cost per bit increases i.e. Internal
Memory is costlier than External Memory.
19

Characteristics of Memory
The key characteristics of memory devices or memory system are as follows:

1. Location
2. Capacity
3. Unit of Transfer
4. Access Method
5. Performance
6. Physical type
7. Physical characteristics
8. Organization

1. Location:
It deals with the location of the memory device in the computer system. There are three possible
locations:

 CPU : This is often in the form of CPU registers and small amount of cache
 Internal or main: This is the main memory like RAM or ROM. The CPU can directly
access the main memory.
 External or secondary: It comprises of secondary storage devices like hard disks,
magnetic tapes. The CPU doesn’t access these devices directly. It uses device controllers
to access secondary storage devices.

2. Capacity:
The capacity of any memory device is expressed in terms of: i)word size ii)Number of words
 Word size: Words are expressed in bytes (8 bits). A word can however mean any number
of bytes. Commonly used word sizes are 1 byte (8 bits), 2bytes (16 bits) and 4 bytes (32
bits).
 Number of words: This specifies the number of words available in the particular
memory device. For example, if a memory device is given as 4K x 16.This means the
device has a word size of 16 bits and a total of 4096(4K) words in memory.
3. Unit of Transfer:
It is the maximum number of bits that can be read or written into the memory at a time. In case
of main memory, it is mostly equal to word size. In case of external memory, unit of transfer is
not limited to the word size; it is often larger and is referred to as blocks.
4. Access Methods:
It is a fundamental characteristic of memory devices. It is the sequence or order in which
memory can be accessed. There are three types of access methods:
20

 Random Access: If storage locations in a particular memory device can be accessed in


any order and access time is independent of the memory location being accessed. Such
memory devices are said to have a random access mechanism. RAM (Random Access
Memory) IC’s use this access method.
 Serial Access: If memory locations can be accessed only in a certain predetermined
sequence, this access method is called serial access. Magnetic Tapes, CD-ROMs employ
serial access methods.
 Semi random Access: Memory devices such as Magnetic Hard disks use this access
method. Here each track has a read/write head thus each track can be accessed randomly
but access within each track is restricted to a serial access.
5. Performance: The performance of the memory system is determined using three parameters
 Access Time: In random access memories, it is the time taken by memory to complete
the read/write operation from the instant that an address is sent to the memory. For non-
random access memories, it is the time taken to position the read write head at the desired
location. Access time is widely used to measure performance of memory devices.
 Memory cycle time: It is defined only for Random Access Memories and is the sum of
the access time and the additional time required before the second access can commence.
 Transfer rate: It is defined as the rate at which data can be transferred into or out of a
memory unit.
6. Physical type: Memory devices can be either semiconductor memory (like RAM) or magnetic
surface memory (like Hard disks).
7.Physical Characteristics:

 Volatile/Non- Volatile: If a memory devices continues hold data even if power is turned
off. The memory device is non-volatile else it is volatile.

8. Organization:
 Erasable/Non-erasable: The memories in which data once programmed cannot be
erased are called Non-erasable memories. Memory devices in which data in the memory
can be erased is called erasable memory.
E.g. RAM(erasable), ROM(non-erasable)
21

Locality of Reference
Locality of reference refers to a phenomenon in which a computer program tends to access same
set of memory locations for a particular time period. In other words, Locality of
Reference refers to the tendency of the computer program to access instructions whose
addresses are near one another. The property of locality of reference is mainly shown by loops
and subroutine calls in a program.

1. In case of loops in program control processing unit repeatedly refers to the set of instructions
that constitute the loop.
2. In case of subroutine calls, everytime the set of instructions are fetched from memory.
3. References to data items also get localized that means same data item is referenced again
and again.
22

In the above figure, you can see that the CPU wants to read or fetch the data or instruction. First,
it will access the cache memory as it is near to it and provides very fast access. If the required
data or instruction is found, it will be fetched. This situation is known as a cache hit. But if the
required data or instruction is not found in the cache memory then this situation is known as a
cache miss. Now the main memory will be searched for the required data or instruction that was
being searched and if found will go through one of the two ways:
1. First way is that the CPU should fetch the required data or instruction and use it and that’s it
but what, when the same data or instruction is required again.CPU again has to access the
same main memory location for it and we already know that main memory is the slowest to
access.
2. The second way is to store the data or instruction in the cache memory so that if it is needed
soon again in the near future it could be fetched in a much faster way.
Cache Operation:
It is based on the principle of locality of reference. There are two ways with which data or
instruction is fetched from main memory and get stored in cache memory. These two ways are
the following:
1. Temporal Locality –
Temporal locality means current data or instruction that is being fetched may be needed
soon. So we should store that data or instruction in the cache memory so that we can avoid
again searching in main memory for the same data.
23

When CPU accesses the current main memory location for reading required data or
instruction, it also gets stored in the cache memory which is based on the fact that same data
or instruction may be needed in near future. This is known as temporal locality. If some data
is referenced, then there is a high probability that it will be referenced again in the near
future.
2. Spatial Locality –
Spatial locality means instruction or data near to the current memory location that is being
fetched, may be needed soon in the near future. This is slightly different from the temporal
locality. Here we are talking about nearly located memory locations while in temporal
locality we were talking about the actual memory location that was being fetched.
24

Cache Performance:
The performance of the cache is measured in terms of hit ratio. When CPU refers to memory and
find the data or instruction within the Cache Memory, it is known as cache hit. If the desired data
or instruction is not found in the cache memory and CPU refers to the main memory to find that
data or instruction, it is known as a cache miss.
Hit + Miss = Total CPU Reference
Hit Ratio(h) = Hit / (Hit+Miss)
Average access time of any memory system consists of two levels: Cache and Main Memory.
If Tc is time to access cache memory and Tm is the time to access main memory then we can
write:
Tavg = Average time to access memory
Tavg = h * Tc + (1-h)*(Tm +

\
25

External memory
External storage, in computing terms, refers to all of the addressable data that is not stored on a
drive internal to the system. It can be used as a backup, to store achieved information or to
transport data. External storage is not part of a computer's main memory or storage, hence it is
called secondary or auxiliary storage

External storage devices are commonly available in the form of flash drives, USB drives, CDs
and DVDs. External storage is often used as a form of a backup or for transportation of data from
one system to another. External storage allows the user to store information, especially data that
is not used frequently, outside the computer’s main memory without much additional cost, since
the cost per bit of semiconductors is higher than any external storage device’s price.

What is RAID?

RAID is an acronym for Redundant Array of Independent (or Inexpensive) Disks. In fact, RAID
is the way of combining several independent and relatively small disks into a single storage of a
large size. The disks included into the array are called array members. The disks can be
combined into the array in different ways which are known as RAID levels. Each of RAID
levels has its own characteristics of:

 Fault-tolerance which is the ability to survive of one or several disk failures.


 Performance which shows the change in the read and write speed of the entire array as
compared to a single disk.
 The capacity of the array which is determined by the amount of user data that can be
written to the array. The array capacity depends on the RAID level and does not always
match the sum of the sizes of the RAID member disks. To calculate the capacity of the
particular RAID type and a set of the member disks you can use a free online RAID
calculator.

How RAID is organized?

Two independent aspects are clearly distinguished in the RAID organization.

1. The organization of data in the array (RAID storage techniques: striping, mirroring,
parity, combination of them).
2. Implementation of each particular RAID installation - hardware or software.

RAID storage techniques

The main methods of storing data in the array are:


26

 Striping - splitting the flow of data into blocks of a certain size (called "block size") then
writing of these blocks across the RAID one by one. This way of data storage affects on
the performance.
 Mirroring is a storage technique in which the identical copies of data are stored on the
RAID members simultaneously. This type of data placement affects the fault tolerance as
well as the performance.
 Parity is a storage technique which is utilized striping and checksum methods. In parity
technique, a certain parity function is calculated for the data blocks. If a drive fails, the
missing block are recalculated from the checksum, providing the RAID fault tolerance.

All the existing RAID types are based on striping, mirroring, parity, or combination of these
storage techniques.

RAID levels

 RAID 0 - based on striping. This RAID level doesn't provide fault tolerance but increases
the system performance (high read and write speed).
 RAID 1 - utilizes mirroring technique, increases read speed in some cases, and provides
fault tolerance in the loss of no more than one member disk.
 RAID 0+1 - based on the combination of striping and mirroring techniques. This RAID
level inherits RAID 0 performance and RAID 1 fault tolerance.
 RAID1E - uses both striping and mirroring techniques, can survive a failure of one
member disk or any number of nonadjacent disks. There are three subtypes of RAID 1E
layout: near, interleaved, and far. More information and diagrams on the RAID 1E page.
 RAID 5 - utilizes both striping and parity techniques. Provides the read speed
improvement as in RAID 0 approximately, survives the loss of one RAID member disk.
 RAID 5E - a variation of RAID 5 layout the only difference of which is an integrated
spare space allowing to rebuild a failed array immediately in case of a disk failure. Read
more on the RAID5E page.
 RAID 5 with delayed parity - pretty similar to basic RAID 5 layout, but uses
nonstandard scheme of striping. More information about RAID5 with delayed parity.
 RAID 6 - similar to RAID 5 but uses two different parity functions. The read speed is the
same as in RAID 5.

RAID implementations

RAID can be created by two different ways:

 with the use of operating system drivers, so called software RAID;


 with the use of special hardware, so called hardware RAID.

Software RAID

Software RAID is one of the cheapest RAID solutions.


27

Nowadays, almost any of the operating systems has a built-in capability to create RAID, though
not for all RAID levels. Thus, Windows home editions allow user to create only RAID 0, while
RAID 1 and RAID 5 can be created only using Windows server editions. RAID layout created
by means of Windows is inseparably linked with the host operating system and so its partitions
cannot be used, for example, in dual boot.

Software RAID is created based on the user's computer and therefore it uses the host system
CPU for implementation. It should be noted, that in case of RAID levels 0 and 1, CPU load is
negligible, but for the RAID types based on parity, CPU load can vary from 1 to 5 percent
depending on CPU power and the number of the disks, which is also negligible for practical
purposes.

There are certain limitations on the use of the software RAID to boot the system. Only RAID 1
can contain boot partition, while system boot is impossible with a software RAID 5 and RAID
0.

Keep in mind that in most cases software RAID doesn't implement the hot-swapping and so it
cannot be used where continuous availability is required.

Hardware RAID

Hardware RAID is created using separate hardware. Basically there are two options:

 inexpensive RAID chip possibly built into the motherboard,


 more expensive option with a complex standalone RAID controller. Such controllers
can be equipped with their own CPU, battery-backed up cache memory, and they
typically support hot-swapping.

A hardware RAID has some advantages over a software RAID, such as:

 doesn't use CPU of the host computer;


 allows user to create boot partitions;
 handles errors better, since communicates with the devices directly;
 supports hot-swapping.
28

Modes of I/O Data Transfer


There are three modes of transfer for data, commands and status as follows:
1) Programmed IO
2) Interrupt driven IO
3) Direct memory access

 Programmed I/O is implicated to data transfers that are initiated by a CPU, under driver
software control to access Registers or Memory on a device.
 With programmed I/O, data are exchanged between the processor and the I/O module.
The processor executes a program that gives it direct control of the I/O operation,
including sensing device status, sending a read or write command, and transferring the
data. When the processor issues a command to the I/O module, it must wait until the I/O
operation is complete.
 If the processor is faster than the I/O module, this is wasteful of processor time. With
interrupt-driven I/O, the processor issues an I/O command, continues to execute other
instructions, and is interrupted by the I/O module when the latter has completed its work.
 With both programmed and interrupt I/O, the processor is responsible for extracting data
from main memory for output and storing data in main memory for input. The alternative
is known as direct memory access. In this mode, the I/O module and main memory
exchange data directly, without processor involvement.
 With programmed I/O, the I/O module will perform the requested action and then set the
appropriate bits in the I/O status register. The I/O module takes no further action to alert
the processor.
29

 As shown in Figure 6, when the processor is executing a program and encounters an


instruction relating to I/O, it executes that instruction by issuing a command to the
appropriate I/O module. In particular, it does not interrupt the processor. Thus, it is the
responsibility of the processor periodically to check the status of the I/O module. Then if
the device is ready for the transfer (read/write).The processor transfers the data to or from
the I/O device as required. As the CPU is faster than the I/O module, the problem with
programmed I/O is that the CPU has to wait a long time for the I/O module of concern to
be ready for either reception or transmission of data.
i. The CPU, while waiting, must repeatedly check the status of the I/O module, and this
process is known as Polling.
ii. Therefore, the level of the performance of the entire system is severely degraded.
30

INTERRUPT DRIVEN I/O:


 This technique is used to overcome the limitation of programmed I/O.
 In interrupt driven I/O, instead of making the processor to verify the status of I/O module.
It is the responsibility of I/O module to intimate the processor by interrupt signal.
 CPU responds to interrupt signals and stores the return address from the program counter
(PC) into the memory stack and then the control branches to a interrupt service routine
(ISR).
 ISR processes the required I/O Transfer.
 After completion of executing interrupt routine CPU returns to previous program and
continue what it was doing before.

Interrupt:

 An interrupt or exception causes CPU to transfer the control temporarily from its current
program to another program i.e. interrupt handler.
 Block Diagram for Interrupt Driven I/O

DMA (DIRECT MEMORY ACCESS):


1. Direct Memory Access (DMA) allows devices to transfer data without subjecting the
processor a heavy overhead. Otherwise, the processor would have to copy each piece of
data from the source to the destination. This is typically slower than copying normal
blocks of memory since access to I/O devices over a peripheral bus is generally slower
than normal system RAM. During this time the processor would be unavailable for any
other tasks involving processor bus access. But it can continue to work on any work
which does not require bus access.
2. When large volumes of data are to be moved, a more efficient technique is required:
direct memory access (DMA).
3. DMA involves an additional module on the system bus. This module is called the DMA
module and it is shown in Figure 4. The DMA module is capable of mimicking the
processor and indeed, of taking over control of the system from the processor. It needs to
do this to transfer data to and from memory over the system bus.
4. The DMA module must use the bus only when the processor does not need it, or it must
force the processor to suspend operation temporarily.
31

1. It is also referred to as cycle stealing, because the DMA module in effect steals a bus
cycle. When the processor wishes to read or write a block of data, it issues a command to
the DMA module, by sending to the DMA module the following information:
i. Whether a read or write is requested, using the read or write control line between the
processor and the DMA module
ii. The address of the I/O device involved, communicated on the data lines
iii. The starting location in memory to read from or write to, communicated on the data
lines and stored by the DMA module in its address register
iv. The number of words to be read or written, again communicated via the data lines and
stored in the data count register

2. The Control Logic in the DMA module is responsible for the generation of control
signals.
3. The processor then continues with other work. It has delegated this I/O operation to the
DMA module. The DMA module transfers the entire block of data, one word at a time,
directly to or from memory, without going through the processor. When the transfer is
complete, the DMA module sends an interrupt signal to the processor.
4. Thus, the processor is involved only at the beginning and end of the transfer. In the
instruction cycle the processor may be suspended. In each case, the processor is
suspended just before it needs to use the bus. The DMA module then transfers one word
and returns control to the processor.
5. Note that this is not an interrupt; the processor does not save a context and do something
else. Rather, the processor pauses for one bus cycle. The overall effect is to cause the
processor to execute more slowly. Nevertheless, for a multiple-word I/O transfer, DMA
is far more efficient than interrupt-driven or programmed I/O.
32

1. The configuration explained above is shown in Figure 5(a), it is inexpensive but


inefficient. As with processor-controlled programmed I/O, each transfer of a word
consumes two bus cycles. The number of required bus cycles can be cut substantially by
integrating the DMA and I/O functions, as Figure 5(b) shows. There is a path between the
DMA module and one or more I/O modules that does not include the system bus.

1. The DMA logic may actually be a part of an I/O module, or it may be a separate module
that controls one or more I/O modules. This concept can be taken one step further by
connecting I/O modules to the DMA module using an I/O bus; this is shown in Figure
5(c). This reduces the number of I/O interfaces in the DMA module to one and provides
for an easily expandable configuration.
2. In both cases Figure 5(b) and Figure5(c), the system bus that the DMA module shares
with the processor and memory is used by the DMA module only to exchange data with
memory. The exchange of data between the DMA and I/O modules takes place off the
system bus.
33

You might also like