GXEST203 - FOUNDATIONS OF COMPUTING:
FROM HARDWARE ESSENTIALS TO WEB DESIGN
(Common to Group A & B)
Module1
Computer Hardware – CPU, Memory - Memory
hierarchy: registers, cache, RAM, virtual memory,
Motherboard - Computer Peripherals - I/O devices,
Storage devices- HDDs, SSDs, optical drives, I/O
communication and device management, Interface
cards – Buses – Firmware - Boot process
The Computer Defined
Electronic device
Converts data into information
Modern computers are digital
Two digits combine to make data
Older computers were analog
A range of values made data
Computers For Individual Use
Desktop computers
The most common type of computer
Sits on the desk or floor
Performs a variety of tasks
Workstations
Specialized computers
Optimized for science or graphics
More powerful than a desktop
Computers For Individual Use
Notebook computers
Small portable computers
Weighs between 3 and 8 pounds
About 8 ½ by 11 inches
Typically as powerful as a desktop
Can include a docking station
Computers For Individual Use
Tablet computers
Newest development
in portable computers
Input is through
a pen
Run specialized
versions of office
products
Computers For Individual Use
Handheld computers
Very small computers
Personal Digital Assistants (PDA)
Note taking or contact management
Data can synchronize with a desktop
Smart phones
Hybrid of cell phone and PDA
Web surfing, e-mail access
Computers For Organizations
Network servers
Centralized computer
All other computers connect
Provides access to network resources
Multiple servers are called server farms
Often simply a powerful desktop
Computers For Organizations
Mainframes
Used in large
organizations
Handle thousands
of users
Users access through
a terminal
Computers For Organizations
Minicomputers
Called midrange computers
Power between mainframe and desktop
Handle hundreds of users
Used in smaller organizations
Users access through a terminal
Computers For Organizations
Supercomputers
The most powerful
computers made
Handle large and
complex calculations
Process trillions of
operations per second
Found in research
organizations
Computers In Society
More impact than any other invention
Changed work and leisure activities
Used by all demographic groups
Computers are important because:
Provide information to users
Information is critical to our society
Managing information is difficult
Computers In Society
Computers at home
Many homes have multiple computers
Most American homes have Internet
Computers are used for
Business
Entertainment
Communication
Education
Computers In Society
Computers in education
Computer literacy required at all levels
Computers in small business
Makes businesses more profitable
Allows owners to manage
Computers in industry
Computers are used to design products
Assembly lines are automated
Computers In Society
Computers in government
Necessary to track data for population
Police officers
Tax calculation and collection
Governments were the first computer users
Computers In Society
Computers in health care
Revolutionized health care
New treatments possible
Scheduling of patients has improved
Delivery of medicine is safer
Parts of the Computer System
Computer systems have four parts
Hardware
Software
Data
User
Parts of the Computer System
Hardware
Mechanical devices in the computer
Anything that can be touched
Software
Tell the computer what to do
Also called a program
Thousands of programs exist
Parts of the Computer System
Data
Pieces of information
Computer organize and present data
Users
People operating the computer
Most important part
Tell the computer what to do
Information Processing Cycle
Steps followed to process data
Input
Processing
Output
Storage
Essential Computer Hardware
Computers use the same basic hardware
Hardware categorized into four types
Essential Computer Hardware
Processing devices
Brains of the computer
Carries out instructions from the program
Manipulate the data
Most computers have several processors
Central Processing Unit (CPU)
Secondary processors
Processors made of silicon and copper
Essential Computer Hardware
Memory devices
Stores data or programs
Random Access Memory (RAM)
Volatile
Stores current data and programs
More RAM results in a faster system
Read Only Memory (ROM)
Permanent storage of programs
Holds the computer boot directions
Essential Computer Hardware
Input and output devices
Allows the user to interact
Input devices accept data
Keyboard, mouse
Output devices deliver data
Monitor, printer, speaker
Some devices are input and output
Touch screens
Essential Computer Hardware
Storage devices
Hold data and programs permanently
Different from RAM
Magnetic storage
Floppy and hard drive
Uses a magnet to access data
Optical storage
CD and DVD drives
Uses a laser to access data
Software Runs The Machine
Tells the computer what to do
Reason people purchase computers
Two types
System software
Application software
Software Runs The Machine
System software
Most important software
Operating system
Windows XP
Network operating system (OS)
Windows Server 2003
Utility
Symantec AntiVirus
Software Runs The Machine
Application software
Accomplishes a specific task
Most common type of software
MS Word
Covers most common uses of computers
Computer data
Fact with no meaning on its own
Stored using the binary number system
Data can be organized into files
Computer users
Role depends on ability
Setup the system
Install software
Mange files
Maintain the system
“Userless” computers
Run with no user input
Automated systems
System Block Diagram
The computer unit is made up conceptually of three major components,
the arithmetic/logic unit (ALU), the control unit (CU), and memory. The
ALU and CU together are known as the central processing unit (CPU).
I/O Interface: The I/O interface corresponds in function roughly to the input
and output baskets
CPU: Major Components
ALU (arithmetic logic unit)
The arithmetic/logic unit is the component of the CPU where
data is held temporarily and where calculations take place.
It corresponds directly to the calculator in the Little Man
Computer.
CPU: Major Components
CU (control unit)
Performs fetch/execute cycle
Accesses program instructions and issues commands to the
ALU
Moves data to and from CPU registers and other hardware
components
The control unit determines the particular instruction to be
executed by reading the contents of a program counter (PC),
sometimes called an instruction pointer (IP), which is a part of the
control unit.
The Little Man Computer
Concept of Registers
Small, permanent storage locations within the CPU
used for a particular purpose
Register equivalent to the calculator is known as an
accumulator
They are not addressed as a memory location
Manipulated directly by the Control Unit
Each register is wired within the CPU to perform its
specific role.
Size in bits or bytes (not in MB like memory)
Ranges usually from 1 to 128 bits.
Can hold data, an address or an instruction
Registers
Use of Registers
Scratchpad for currently executing program
Holds data needed quickly or frequently
Stores information about status of CPU and currently
executing program
Address of next program instruction
Signals from external devices
General Purpose Registers
User-visible registers
Hold intermediate results or data values, e.g., loop counters
Equivalent to LMC’s calculator
Typically several dozen in current CPUs
Special-Purpose Registers
Program Count Register (PC/IP)
Also called instruction pointer
Holds the address of the current instruction being
executed.
Instruction Register (IR)
holds the actual instruction being executed currently
by the computer
Memory Address Register (MAR)
holds the address of a memory location.
Special-Purpose Registers
Memory Data Register (MDR)/Memory Buffer Register
Hold a data value that is being stored to or retrieved
from the memory location currently addressed by the
memory address register.
Flags (one bit Boolean variable) The control unit will
also contain several 1-bit registers, known as flags
It track condition like arithmetic carry and overflow,
power failure, internal computer error
Status Registers
several flags are grouped into one or more status
registers.
Status of CPU and currently executing program
Register Operations
Registers can be loaded with values from other
locations
Addition and subtraction from the
value previously stored in a register
Shift or rotate data in a register right or left by one or
more bits.
Test contents for conditions such as zero, positive,
negative, or too large to fit in the register
MEMORY UNIT-Operation of
Memory
Each memory location has a unique address
Address from an instruction is copied to the
MAR which finds the location in memory
CPU determines if it is a store or retrieval
Transfer takes place between the MDR and
memory
MDR is a two way register
Relationship between MAR,
MDR and Memory
Address Data
Relationship between MAR,
MDR and Memory
• The output from the memory address register is passed
to an address decoder.
• The output from the address decoder consists of a
series of lines, each of which can light up the bulbs in a
single row of cells.
• Only one line at a time can be activated—specifically,
the one corresponding to the decoded address.
• The active line will light the bulbs that correspond to
“1s”, leaving the “0s” dark.
• The viewer therefore will see only the single group of
cells that is currently addressed by the memory address
register.
MAR-MDR Example
Visual Analogy of Memory
Memory Capacity
Determined by two factors
1. Number of bits in the MAR
LMC = 100 (00 to 99)- two-digit addresses in the Little
Man Computer resulted in a maximum of one hundred mailboxes
2K where K = width of the register in bits
2. Size of the address portion of the instruction
4 bits allows 16 locations
8 bits allows 256 locations
32 bits allows 4,294,967,296 or 4 GB
RAM: Random Access Memory
DRAM (Dynamic RAM)
Most common, cheap, less electrical power, less heat,
smaller space
Volatile: must be refreshed (recharged with power) 1000’s
of times each second
requires extra electronic circuitry that “refreshes”memory
periodically
SRAM (static RAM)
Faster and more expensive than DRAM
Volatile, Lower in bit density.
Small amounts are often used in cache memory for high-
speed memory access
Nonvolatile Memory
ROM
Read-only Memory
Holds software that is not expected to change over
the life of the system
EEPROM
Electrically Erasable Programmable ROM
Flash Memory
Faster than disks but more expensive
Uses hot carrier injection to store bits of data
Slow rewrite time compared to RAM
Useful for nonvolatile portable computer storage
Fetch-Execute Cycle
Two-cycle process because both instructions and
data are in memory
Fetch
Decode or find instruction, load from memory into
register and signal ALU
Execute
Performs operation that instruction requires
Move/transform data
Cache Memory
Most modern systems also provide asmall
amount of static RAM memory that is used for
high-speed access.
This memory is known as cache memory
Cache Memory
If the required memory data is not already present in
cache memory, an extra step is required. In this case,
a cache line that includes the required location is
copied from memory to the cache.
When cache memory is full, some block in cache
memory must be selected for replacement(LRU, Least
Recently Used)
The entire cache operation is managed by the cache
controller.
Two level Cache
A personal computer secondary cache commonly
provides an additional 512 KB–2 MB of cache.
The use of a dedicated on-chip bus between level 1
cache and level 2 cache provides faster response
than connecting the level 1 cache to memory or to a
level 2 cache on the regular memory bus.
Memory/Storage Hierarchy
Memory/Storage Hierarchy
At the top of the hierarchy are the CPU registers used
to hold data for the short term while processing is taking
place.
Cache memory, is the fastest memory outside the CPU-
used to hold current data and instructions. There may be
as many as three different levels of cache.
The CPU accesses the data or instruction in
conventional memory if cache memory is not present.
Next in the hierarchy is conventional memory(DRAM)
Both conventional and cache memory are referred to
as primary memory. Both provide immediate access to
program instructions and data by the CPU.
Memory/Storage Hierarchy
Storage in the hierarchy that is not immediately
available to the CPU, is referred to as secondary
storage and is treated as I/O.
Data and programs in secondary storage must be
copied to primary memory for CPU access.
Access to secondary storage is significantly slower
than primary storage except flash memory.
One important advantage of secondary storage, is its
permanence, or nonvolatility- used to store massive
amounts of data
Memory/Storage Hierarchy
Flash memory uses a special type of transistor that
can hold data indefinitely without power
Eg: a flash memory card may be used to store digital
camera photographs until they are moved to a
computer for long-term storage
The magnetic media used for disk and tape and the
optical media used for DVD and CD also retain data
indefinitely.
Large amounts of online secondary storage may be
provided at low cost.
Memory/Storage Hierarchy
Most flash memory devices, optical disks, and many
magnetic disks are designed for easy removal from
the computer system.
Well suited for backup and for off-line storage of
data that can be loaded when the data is needed.
Secondary storage may be used for off-line archiving,
for moving data easily from machine to machine, and
for off-line backup storage.
Memory/Storage Hierarchy
Data and programs may be stored on a secondary
storage device connected to a different computer and
accessed through a network connection between the
computers.
In this context, the computer with secondary storage
is sometimes known as a server or a file server.
Large-scale storage services are frequently organized
and implemented as storage area networks (SANs).
Virtual Memory/Virtual Storage
Universally accepted solution to the problems inherent
in memory management
Uses a combination of operating system software and
special purpose hardware to simulate a memory that
meets the management needs of a modern system
The primary method of implementing virtual storage is
called paging.
Virtual Memory/Virtual Storage
Pages and Frames
Assume that memory is divided into blocks. These
blocks are called frames.
all the frames are of equal size, typically 1 KB–4 KB.
The blocks are numbered, starting from 0.
We are dividing each memory address into two parts:
a frame number and the specific address within the
particular frame. The address within the frame is
called an offset, because it represents the offset from
the beginning of the frame.
Virtual Memory/Virtual Storage
We also divide a program into blocks, where each block
in the program is the same size as a frame. The blocks
in a program are called pages.
Dynamic address translation is built into the CPU
hardware of every modern computer
The hardware automatically and invisibly translates
every individual address in a program
(the virtual addresses) to a different corresponding
physical location (the physical addresses)- by the
processor's memory management unit (MMU)
Virtual Memory/Virtual Storage
This allows the operating system's program loader to
place the pages of a program into any available
frames of physical memory, page by page,
noncontiguously, so that it is not necessary to find a
contiguous space large enough to fit the entire
program.
Any page of any program can be placed into any
available frame of physical memory.
For each program, the operating system creates a
page table, which keeps track of the corresponding
frame location in physical memory where each page is
stored.
Virtual Memory/Virtual Storage
Motherboard
Here considers discussion of computer system
hardware by showing you how all these pieces fit
together in real modern computer systems.
Major components that make up a computer system:
one or more CPUs, primary storage, I/O modules,
various I/O devices, and the buses that connect
everything together
Motherboard-Typical Smartphone System
Motherboard-Typical Smartphone System
One or more CPUs
Memory
One or more hard disks or solid-state disks
Keyboard and pointing device
Built-in graphics, video, and audio capability.
USB, HDMI, VGA, Ethernet, and Wi-Fi interface
controllers
Ports (perhaps, also, Bluetooth, SATA, and/or
Thunderbolt), network connections, printers, mice,
external drives, SD cards, and other devices.
Motherboard
In most computer systems, the CPU, memory,
and other major components are mounted to
wiring on a printed circuit board known as a
motherboard.
Major CPU System Components
Motherboard
A Personal Computer Motherboard
Motherboard
Components of a typical Desktop PC
System Architecture
Two basic I/O system architectures in common use:
Bus architecture - used in almost all embedded
and mobile devices, personal computers,
workstations, and in some mainframe computers
Channel architecture - found primarily in IBM
mainframe computers.
System Architecture(Bus)
System Architecture(Bus)
There are five basic components
1. The CPU or CPUs.
2. The I/O peripheral devices.
3. Memory
4. I/O modules, controllers, or I/O channel subsystem
units. The I/O modules act as interfaces between the
CPU and memory and one or more I/O devices.
5. The buses connecting the various components together.
Generalized Bus Interface Configuration
Generalized Bus Interface Configuration
Two so-called bridges divide the workload.
Speed-critical components, in particular, the CPU and
memory, are interconnected through a memory
bridge, sometimes called the northbridge in computer
literature.
More traditional I/O is typically connected using
various standard buses, such as SATA, Thunderbolt,
and USB, through I/O controllers and PCI-Express
buses to an I/O bridge, sometimes called the
southbridge.
A high-speed bus interconnects the two bridges.
I/O DEVICES
Keyboard : an input device.
Basically a character-based device
Typing on the keyboard of your PC results in Unicode
or ASCII input to the computer, one character at a
time.
Input from the keyboard is very slow because it is
dependent on the speed of typing, as well as on the
thought process of the user.
For “input” statement of some kind requesting input
data for the program.
There are other times when the user wishes to
interrupt what the computer is doing.
On a multiuser system, there may be many keyboards
connected to a single computer
I/O DEVICES
Mouse: an input device
When you move the mouse, you expect the cursor to
move on the screen.
Clicking on a mouse button may serve as expected input
to a program, or it may be unexpected and change the
way in which the program is executing.
When the user selects an item on a drop-down menu or
clicks on a toolbar icon, she expects a timely response.
Here also, data rates are slow.
I/O DEVICES
Printers: Output device
Operate over a wide range of data rates.
Most modern output is produced graphically or as a
mixture of font descriptors, text, bitmap graphics, and
object graphics, a page or a screen at a time, using a
page description language.
The choice of page description language and mixture of
elements is determined by the capabilities of the printer
or graphics card.
Disks, printers, screens, and most other I/O devices
operate almost completely under CPU program control.
I/O DEVICES
I/O DEVICES
I/O controllers may be very simple and control a single
device, or they may be complex, with substantial built-in
intelligence, and may control many devices.
I/O controllers that control a single type of device are
often called device controllers.
For example, an I/O controller that controls disks would
be a disk controller.
HDD
MAGNETIC DISKS:
• Consists of one or more flat, circular platters made of
glass, metal, or plastic, and coated with a magnetic
substance.
• Particles within a small area of the magnetic substance
can be polarized magnetically in one of two directions
with an electromagnet
• Thus, magnetic polarization can be used to distinguish
1s and 0s.
• Electromagnetic read/write heads are used for this
purpose.
HDD
• A drive motor rotates the disk platter(s) about its
central axis.
• On most drives, the motor rotates the disk at a fixed
speed.
• An arm has the read/write head mounted at the end.
• The arm makes it possible for the head to move
radially in and out across the surface of the disk.
• A head motor controls precisely the position of the
arm on the disk.
HDD
HDD
Most hard disk drive contain multiple platters, all mounted on the
same axis, with heads on both surfaces of each platter.
The heads move in tandem, so they are positioned over the same
point on each surface.
With the head in a particular position, it traces out a circle on the disk
surface as the disk rotates; this circle is known as a track.Each track
contains one or more blocks of data.
Since the heads on each surface all line up, the set of tracks for all the
surfaces form a cylinder
The surface of the disk platter as divided into equally sized pie shape
segments, known as sectors.
Each sector on a single track contains one block of data, typically 512
or 4,096 bytes
Block represents the smallest unit that can be independently read or
written
HDD
The transfer time is kept constant with the motor rotating at a fixed
speed.
This technique is called CAV, for constant angular velocity.
1CAV has the advantage of simplicity and fast access.
Modern disk drives divide the disk into a number of zones, typically
sixteen.
HDD
The platter on a hard disk drive is made of a rigid
material and is precisely mounted.
The location of the heads radially is tightly
controlled.
A disk that can store large amounts of data and
that retrieves data quickly.
A typical hard disk rotates at 5400 revolutions per
minute (rpm) or 7200 rpm
HDD
A disk platter, arm, and read/write head is shown in the
above figure.
Here, the hard disk drive contains three platters and six
heads.
HDD
The time that is required to move from one track to
another is known as the seek time.
Since the distance between the two tracks is
obviously a factor, the average seek time is used
as a specification for the disk.
Once the head is located over the desired track, the
read/write operation must wait for the disk to rotate
to the beginning of the correct sector.
The time for this to occur is known as the rotational
latency time, or sometimes as rotational delay or
simply latency time.
HDD
HDD
Thus, the average latency time can be calculated
from the rotational speed of the disk as
Eg: For a typical hard disk rotating at 3600
revolutions per minute, or 60 revolutions per second,
the average latency is
HDD
If the hard drive in the example contains 30 sectors per
track, the transfer time for a single block would be
Eg: If the hard drive in the above example contains 30
sectors per track, the transfer time for a single block
would be
HDD – Disk Arrays
In larger computer environments, with mainframe
computers or large PCs that provide program and data
storage facilities for a network, we group multiple disks
together.
Such a grouping of two or more disk drives is called a
disk array or a drive array.
Used to reduce overall data access time by sharing the
data among multiple disks
Increase system reliability by providing storage
redundancy.
One useful type of disk array is known as RAID, which
stands for Redundant Array of Inexpensive Disks. (or
“Redundant Array of Independent Disks”)
HDD – Disk Arrays
Two standard methods of implementing a disk array:
1. Mirrored array: consists of two or more disk drives.
each disk stores exactly the same data.
If a read failure occurs in one of the drives, the data can
be read from another drive and the bad block marked to
prevent future use of that block, increasing system
reliability.
This technique is particularly suitable for highly reliable
computer systems known as fault-tolerant computers.
HDD – Disk Arrays
2. Striped array:
A file segment to be stored is divided into blocks. Different
blocks are then written simultaneously to different disks.
Multiplies the throughput rate by the number of data disks in
the array.
There are five well-defined RAID standards: RAID 1 through
RAID 5
RAID 1 - A mirrored array, provides protection by storing
everything at least twice
RAIDs 2, 3, and 4 : arrays that are striped in different ways,
Each uses a separate disk for error checking.
RAID 5 eases the roadblock by spreading the error-checking
blocks over all of the disks.
SSD
Large-capacity flash memory units called solid-state drives
(SSDs)are used to access stored data quickly.
It is used as the long-term storage device of choice in
computers, particularly in systems requiring moderate
storage capacity.
Most SSDs provide 60–512 GB of storage.
Large solid-state drives, with capacities in the 10 TB range,
have begun to enter the market.
The capacity of SSDs is continually expanding, and the cost
falling, suggesting that SSDs may replace magnetic disk
storage for many, if not most, applications within the next few
years.
I/O COMMUNICATION
Input from the peripheral device is transferred from the I/O
controller or buffer for that peripheral device one word at a
time to the I/O data register and from there to an
accumulator or general-purpose register under program
control.
I/O COMMUNICATION
Similarly, individual words of output data pass from
a register to the I/O data register where they can be
read by the appropriate I/O controller, again under
program control.
Each instruction produces a single input or output.
This method is known as Programmed I/O.
I/O COMMUNICATION
I/O COMMUNICATION
I/O COMMUNICATION
Interrupts
Circumstances under which it is important to interrupt the
normal flow of a program in the computer to react to special
events.
Eg: An unexpected user command from the keyboard
a click of a mouse or touch of a finger on a screen
external input from a device requiring attention
an abnormal situation, such as a power failure, that requires
immediate attention from the computer
an attempt to execute an illegal instruction, a request for
service from a network controller
the completion of an I/O task initiated by the program
I/O COMMUNICATION
Computers provide interrupt capability by providing one or
more special control lines to the central processor known
as interrupt lines.
The messages sent to the computer on these lines are
known as interrupts.
The presence of a message on an interrupt line will cause
the computer to suspend the program being executed and
jump to a special interrupt processing program.
Interrupt messages are triggered primarily by the various
I/O controllers in the system.
I/O COMMUNICATION
Since the computer is capable only of executing
programs, interrupt actions take the form of special
programs.
I/O COMMUNICATION
The interrupt causes the temporary suspension of the
program in progress. All the pertinent information
about the program being suspended, including the
location of the last instruction executed, and the
values of data in various registers, is saved in a
known part of memory, either in a special area
associated with the program, known as the process
control block (PCB), or in a part of memory known
as the stack area.
This information is known as the program's context,
and will make it possible to restart the program
exactly where it left off, without loss of any data or
program state.
I/O COMMUNICATION
The memory belonging to the original program is kept intact.
The computer then branches to a special interrupt handler
program elsewhere in memory; the interrupt handler program
is also known as an interrupt routine or an interrupt service
routine.
The interrupt handler program determines the appropriate
course of action. This process is known as servicing the
interrupt.
Since many interrupts exist to support I/O devices, most of
the interrupt-handling programs are also known as device
drivers.
When the interrupt routine completes its task, it normally
would return control to the interrupted program, much like
any subprogram.
I/O COMMUNICATION
The Uses of Interrupts:
1. THE INTERRUPT AS AN EXTERNAL EVENT NOTIFIER:
interrupts are useful as notifiers to the CPU of external
events that require action
I/O COMMUNICATION
2. THE INTERRUPT AS A COMPLETION SIGNAL :the
interrupt serves to notify the computer of the completion of a
particular course of action.
I/O COMMUNICATION
3. THE INTERRUPT AS A MEANS OF ALLOCATING CPU
TIME: Each program sequence is allowed to execute some
instructions.
After a certain period of time, that sequence is interrupted
and relinquishes control to a dispatcher program within the
operating system that allocates the next block of time to
another sequence.
I/O COMMUNICATION
4. THE INTERRUPT AS AN ABNORMAL EVENT
INDICATOR: Under certain conditions, we would like the
computer to respond with a specific course of action quickly
and effectively. Eg: power failure(A power line monitor that
connects to the interrupt facility provides this capability) –Eg:
of nonmaskable interrupts(interrupts that are never
disabled)
Another application : When a program attempts to execute
an illegal instruction such as a divide by 0 or a nonexistent
op code, or when a hardware error is detected
I/O COMMUNICATION
SOFTWARE INTERRUPTS: Modern CPU instruction sets
include an instruction that simulates an interrupt.
The software interrupt is very similar to a subroutine
jump to a known, fixed location.
Software interrupts make the interrupt routines available
for use by other programs. Programs can access these
routines simply by executing the INT instruction with the
appropriate parameter.
An important application for software interrupts is to
centralize I/O operations.
I/O COMMUNICATION
DIRECT MEMORY ACCESS(DMA) :
A more efficient form of I/O that transfers block data
directly between the I/O controller and computer
memory, under control of the I/O controller.
The transfer is initiated by a program in the CPU, using
programmed I/O, but the CPU can then be bypassed
for the remainder of the transfer.
The I/O controller will notify the CPU with an interrupt
when the transfer is complete.
Once this has occurred, the data is in memory, ready
for the program to use.
This technique of I/O–memory data transfer is known
as direct memory access, or more commonly, simply as
DMA.
Device Management
The I/O controller serves as an interface between the
CPU and the specific device.
The disk controller is, an example of an I/O controller.
• The disk controller recognizes messages addressed to it
and accepts commands from the CPU, establishing
what the disk drive is to do.
• In this case, the disk controller recognizes that a block
of data is to be written from memory to disk using DMA.
• The disk controller provides a buffer where the data
from memory can be held until it can be transferred to
the disk.
Device Management
Device Management
• The disk controller provides the necessary registers and
controls to perform a direct memory transfer.
• The disk controller have access to a memory address register
and a memory data register separate from those of the CPU,
either within the disk controller or as a separate DMA
controller.
• The disk controller controls the disk drive, moving the head to
the physical location on the disk where data is to be written.
• The disk controller copies data from its buffer to the disk.
• The disk controller has interrupt capability, which it uses to
notify the CPU when the transfer is complete
Device Management
• I/O controllers simplify the task of interfacing peripheral devices
to a CPU.
• I/O controllers offload a considerable amount of work from the
CPU.
• They make it possible to control I/O to a peripheral with a few
simple I/O commands from the CPU. They support DMA, so that
the CPU may be free to perform other tasks.
•Device controllers provide the specialized circuitry required to
interface different types of peripherals to the computer.
INTERFACE CARDS(NIC)
• Network Interface Cards allows computers to be joined
together in a network, usually through Local Area
Connection (LAN).
• The NIC acts as an interpreter, allowing the
computer to send and receive data from one
computer to another in a network.
INTERFACE CARDS(NIC)
The role of the NIC is to:
• Prepare data from the computer for the network
cable.
• Send the data to another computer.
° Control the flow of data between the computer
and the cabling system.
° Receive incoming data from the cable and translate it
into bytes that can be understood by
the computer's CPU.
How it works?
• An Ethernet network interface card is installed in an
available slot inside the computer, typically on the
motherboard.
• The NIC assigns a unique Media Access Control (MAC)
address to the machine, which is used to direct traffic
between the computers on a network. Network cards
also change data from a parallel format, used by
computers, to a serial format necessary in data
transfers; and then back again for received information.
Etrerret r red l u (caole)
o co re
Preparing the Data
• Before data can be sent over the network, the NIC must
change it from a form the computer can understand to a
form that can travel over a network cable. Data moves
through a computer along paths called busses. These
are actually several data paths placed side by side.
Because the paths are side by side (parallel), data can
move along them in lateral groups instead of in a single
(serial) data stream.
• The Transceiver converts the parallel data to serial data
on the network. This is accomplished through the
translation of the computer's digital signals into
electrical or optical signals that can travel on the
network's cables.
Buses
A bus allows the
various devices both
inside and attached to
the system unit to
communicate with each
other
Data bus
Address bus
Word size is the
number of bits the
processor can interpret
and execute at a given
time
Buses
Buses
• The major computer system components (processor, main
memory, I/O modules) need to be interconnected in order to
exchange data and control signals.
• A bus is a communication pathway connecting two or more
devices
• A bus that connects major computer components
(processor, memory, I/O) is called a system bus.
• Bus = a shared transmission medium.
• Only one device at a time Can successfully transmit.
• Shared system bus consists of multiple lines- a hierarchy of
buses is used to improve performance.
Key design elements for buses include:
Arbitration
Timing
width
Bus Types
Industry standard architecture (ISA) bus
Local bus
Peripheral component interconnect (PCI) bus
Accelerated Graphics Port (AGP) bus
Universal Serial Bus (USB)
IEEE 1394 (FireWire)
Buses
Expansion slots connect to expansion buses
Common types of expansion buses include:
PCI Express Accelerated
PCI bus
bus Graphics Port
USB and
PC Card bus
FireWire bus
Data Transfer Rate
The amount of data buses can transfer in a
second
Measured in megabits per second (Mbps) or
megabytes per second (MBps)
FIRMWARE
Some of the program code used to start a
computer must be present in a nonvolatile
segment of primary memory.
This code is known as firmware.
This program area in a PC is the BIOS, or Basic
Input Output System,
A newer version, called EFI or SEFI, for [Secure]
Extensible Firmware Interface, is replacing the
BIOS in newer machines.
Boot Process
Hardware doesn’t know where the operating
system resides and how to load it.
Need a special program to do this job –
Bootstrap loader.
E.g. BIOS – Basic Input Output System.
Bootstrap loader locates the kernel, loads it
into main memory and starts its execution.
How Boot process occurs ?
Reset event on CPU (power up, reboot) causes
instruction register to be loaded with a predefined
memory location. It contains a jump instruction that
transfers execution to the location of Bootstrap
program.
This program is form of ROM, since RAM is in
unknown state at system startup. ROM is convenient
as it needs no initialization and can’t be affected by
virus.
BIOS Interaction
Tasks performed at boot up
Run diagnostics to determine the state of
machine. If diagnostics pass, booting continues.
Runs a Power-On Self Test (POST) to check the
devices that the computer will rely on, are
functioning.
BIOS goes through a preconfigured list of devices
until it finds one that is bootable. If it finds no such
device, an error is given and the boot process
stops.
Initializes CPU registers, device controllers and
contents of the main memory. After this, it loads
the OS.
BIOS Setup
Boot Procedure
Tasks performed at boot up (Contd)
On finding a bootable device, the BIOS loads and
executes its boot sector. In the case of a hard
drive, this is referred to as the master boot record
(MBR) and is often not OS specific.
The MBR code checks the partition table for an
active partition. If one is found, the MBR code
loads that partition's boot sector and executes it.
The boot sector is often operating system
specific, however in most operating systems its
main function is to load and execute a kernel,
which continues startup.
Secondary Boot Loaders
If there is no active partition or the active
partition's boot sector is invalid, the MBR may
load a secondary boot loader and pass control
to it and this secondary boot loader will select
a partition (often via user input) and load its
boot sector.
Examples of secondary boot loaders
GRUB – GRand Unified Bootloader
LILO – LInux LOader
NTLDR – NT Loader
GRUB Loader
Booting and ROM
System such as cellular phones, PDAs and game
consoles stores entire OS on ROM. Done only for small
OS, simple supporting hardware, and rugged operation.
Changing bootstrap code would require changing ROM
chips.
EPROM – Erasable Programmable ROM.
Code execution in ROM is slower. Copied to RAM for
faster execution.
Questions
1. List the four parts of a complete computer system.
2. What are the four phases of the Information processing
cycle?
3. Identify four categories of computer hardware.
4. List four units of measure for computer memory and
storage, not including the byte.
5. What are the two most common input and output
devices?
6. Name and differentiate the two main categories of
storage devices.
7. Name and differentiate the two main categories of
computer software.
8. What is the difference between data and information?
9. What is a fundamental difference between data and
programs?
Questions
10. Ust five tasks a user may be responsible for,
when working with a personal computer.
11. What does ALU stand for? What is its corresponding
component in the Little Man Computer? What does CU
stand for? What is its corresponding LMC component?
12. What is a register? Be precise. Name at least two
components in the LMC that meet the qualifications for a
register. Name several different kinds of values that a
register might hold.
13. What is the purpose of the instruction register? What
takes the place of the instruction register in the LMC?
14. When a value is copied from one register to another,
what happens to the value in the source register? What
happens to the value in the destination register?
Questions
20. There are four primary operations that are normally
performed on a register. Describe each operation.
21. Explain the relationship between the memory
address register, the memory data register, and memory
itself.
22. If the memory register for a particular computer is 32
bits wide, how much memory can this computer support?
23. What is the difference between volatile and
nonvolatile memory? Is RAM volatile or nonvolatile? Is
ROM volatile or nonvolatile?
24. Registers perform a very important role in the fetch–
execute cycle. What is the function of registers in the
fetch–execute instruction cycle?
Questions
25. Explain each step of the fetch part of the fetch–
execute cycle. At the end of the fetch operation, what is
the status of the instruction? Specifically, what has the
fetch operation achieved that prepares the instruction for
execution? Explain the similarity between this operation
and the corresponding operation-performed steps
performed by the Little Man.
26. Assume the following values in various registers and
memory locations at a given point in time:
PC: 20 A: 150 Memory location 20: 160 [ADD 60]
Memory location 60: 30. Show the values that are stored
in each of the following registers at the completion of the
instruction: PC, MAR, MDR, IR, and A.
Questions
27. Define a bus. What are buses used for?
28. What three types of “data” might a bus carry?
29. One large modern computer has a 48-bit memory
address register. How much memory can this computer
address?
30. Peripheral devices can be categorized into three classes.
What are the three classes? Give an example of each.
31. State at least three reasons why storage in a computer is
organized hierarchically.
32.What is the advantage of flash memory over RAM? What
is the advantage of RAM over flash memory? What is the
advantage of flash memory over magnetic hard disk?
33. Draw a circle representing one platter surface of a hard
disk. On your drawing show an example of a track, of a
sector, and of a block.
Questions
34. Suppose a disk is rotating at 7200 rpm. What is the
minimum latency time for this disk? What is the maximum
latency time for this disk?
35. What is a disk array? What advantages does a disk array
offer over those of a single disk?
36.How does the layout of a typical optical disk differ from
that of a magnetic disk? How many tracks does a standard
single-layer CD- ROM contain?
37. What are the advantages and disadvantages of magnetic
tape as compared to other peripheral storage devices?
38.What do the numbers 1920 × 1080 represent when
describing a display?
39.How many pixels are there in a 1024 × 768 display? What
is the picture ratio of this display?
Questions
34. Suppose a disk is rotating at 7200 rpm. What is the
minimum latency time for this disk? What is the maximum
latency time for this disk?
35. What is a disk array? What advantages does a disk array
offer over those of a single disk?
36.How does the layout of a typical optical disk differ from
that of a magnetic disk? How many tracks does a standard
single-layer CD- ROM contain?
37. What are the advantages and disadvantages of magnetic
tape as compared to other peripheral storage devices?
38.What do the numbers 1920 × 1080 represent when
describing a display?
39.How many pixels are there in a 1024 × 768 display? What
is the picture ratio of this display?
Questions
40. What does DMA stand for? What capability does
DMA add to a computer?
41. What data must an I/O controller have before a DMA
transfer takes place? How is this data sent to the
controller?
42. What is the purpose of a completion interrupt at the
conclusion of a DMA transfer?
43. Name at least three benefits that are provided by I/O
controllers.
44. What are the five basic hardware components that
make up a computer?
45. What is the purpose of a bus interface or bus bridge?
Questions
46.Explain what you expect to find on a motherboard.
47. Briefly describe each of the major disadvantages of
parallel buses.