0% found this document useful (0 votes)
208 views

Chapter 7 Input/Output and Storeage Systems

This document provides an overview of chapter 7 on input/output and storage systems from a computer science textbook. The chapter covers I/O architectures, control methods like programmed I/O, interrupt-driven I/O and DMA, magnetic disk technology including hard drives and solid state drives, and data transmission modes. Key topics include I/O performance optimization, I/O buses, seek time, rotational delay, SSD advantages over HDDs, and flash memory endurance.

Uploaded by

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

Chapter 7 Input/Output and Storeage Systems

This document provides an overview of chapter 7 on input/output and storage systems from a computer science textbook. The chapter covers I/O architectures, control methods like programmed I/O, interrupt-driven I/O and DMA, magnetic disk technology including hard drives and solid state drives, and data transmission modes. Key topics include I/O performance optimization, I/O buses, seek time, rotational delay, SSD advantages over HDDs, and flash memory endurance.

Uploaded by

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

Chapter 7 Input/Output and

Storeage Systems
Instrcutor: Hao Zheng
Computer Science and Engineering
University of South Florida

Chapter 7 Objectives
Gain basic understandings of the following topics:
System performance optimization.
I/O architectures and I/O control methods.
Magnetic disk technology

7.1 Introduction
Data storage and retrieval is one of the primary
functions of computer systems.
One could easily make the argument that computers are
more useful to us as data storage and retrieval devices than
they are as computational machines.

All computers have I/O devices connected to them,


and to achieve good performance I/O operations
should be kept to a minimum!
In studying I/O, we seek to understand the different
types of I/O devices as well as how they work.

7.2 I/O and Performance


A computer system involves many components.
Its performance affected by many factors.

Sluggish I/O throughput can have a ripple effect,


dragging down overall system performance.
The fastest processor in the world is of little use
if it spends most of its time waiting for data.
If we really understand whats happening in a
computer system we can make the best possible
use of its resources.
4

7.3 Amdahls Law


The overall performance of a system is a result of
the interaction of all of its components.
System performance is most effectively improved
when the performance of the slowest and most
heavily used components is improved.
Optimize the bottleneck of the system

This idea is quantified by Amdahls Law:


where S is the overall speedup;
f is the fraction of work performed
by a faster component; and
k is the speedup of the faster
component.
5

7.3 Amdahls Law - Terminology


B is twice as fast as A: B uses half of time A does to
finish the same task.
That is, B is 100% faster than A.
Speedup:

Speedup of B over A is 2 in the above example.

7.3 Amdahls Law


Amdahls Law gives us a handy way to estimate the
performance improvement we can expect when we
upgrade a system component.
On a large system, suppose we can
upgrade a CPU to make it 50% faster for $10,000 or
upgrade its disk drives for $7,000 to make them 150%
faster.

Processes spend 70% of their time running in the


CPU and 30% of their time waiting for disk service.
An upgrade of which component would offer the
greater benefit for the lesser cost?
7

7.3 Amdahls Law


The processor option offers a 30% speedup:

And the disk drive option gives a 22% speedup:

Each 1% of improvement for the processor costs


$333, and for the disk a 1% improvement costs $318.
Should price/performance be your only concern?
8

7.3 Amdahls Law


Suppose you are optimizing a program.
Case 1 reduce run time of a segment of code used
80% of time by half.

Case 2 reduce run time of a segment of code used


10% of time by 99%.

7.4 I/O Architectures


We define input/output as a subsystem of
components that moves coded data between
external devices and a host system (CPU+Mem.).
I/O subsystems include:

Blocks of main memory that are devoted to I/O functions.


Buses that move data into and out of the system.
Control modules in the host and in peripheral devices
Interfaces to external components such as keyboards and
disks.
Cabling or communications links between the host system
and its peripherals.

10

7.4 I/O Architectures


Move data between main
memory and device interface

handle communications
between CPU and peripheral
devices

Buffer memory
allows CPU to send
large blocks of data
to peripheral
devices without
waiting for devices
to complete.
11

Handshake Protocol

! " #" $%&" ' ( )* &$+ , " ' - ( . " / 0' 1 $2 &3 #3 43 5
A timing diagram shows waveforms of signals over time.

! " ##$%&' () *#+, - ) . %. / (/ %(*/ ' 01) *%%6 * " 4. $( #" 1 * $4" ' $7 &3 4* * - $3 ' 58 $0) $#. * $7 &* 9 03 : ( $( #" 1 *
12
. " ( $; * * ' $" 4/ ' 3 < 5* - 1 * - =

7.4.1 I/O Control Methods

13

7.4.1 I/O Control Methods - Programmed I/O


CPU has a dedicated register for each I/O port.
Special instructions are used to access I/O ports.
CPU communicates with I/O ports through
polling.
Keep checking the status of I/O ports, transfer data
when ready, then repeat.

Polling results in lower system performance.


CPU waste time by constantly probing the I/O ports.

Less flexible with number of peripheral devices.


14

7.4.1 I/O Control Methods - Interrupt-Driven I/O


This is an idealized I/O subsystem that uses interrupts.
Each device connects its interrupt line to the interrupt controller.

The controller
signals the CPU
when any of the
interrupt lines
are asserted.

15

7.4.1 I/O Control Methods - Interrupt-Driven I/O

Also shown in Chapter 4.


16

7.4.1 I/O Control Methods - Interrupt-Driven I/O

17

7.4.1 I/O Control Methods - Interrupt-Driven I/O


ISR: interrupt service routine.
The particular code that is executed whenever an
interrupt occurs is determined by a set of addresses
called interrupt vectors that are stored in low
memory addresses.
The system state is saved before the interrupt service
routine is executed and is restored afterward.

We provide a flowchart on the next slide.


18

Interrupt Vector Table and Service


Routines
Address

0
1
2

start address ISR 1


start address ISR 2

Address to ISR 1
Address to ISR 2
Address to ISR 3

ISR 1
ISR 2
19

! " #I/O$ Control


%&'! ( Methods
) ) " * '+, '-Mem.
. / Mapped
'0 1( # I/O
) 2"
7.4.1

More flexible in reconfiguring I/O devices.


5 6 . '7 3 8 7 '9 +/ : %$ * ; <: =$ / ': $ '+,

20

34

7.4.1 I/O Control Methods Mem. Mapped I/O


In memory-mapped I/O devices and main memory
share the same address space.
Each I/O device has its own reserved block of memory.
Memory-mapped I/O therefore looks just like a memory
access from the point of view of the CPU.
Thus the same instructions to move data to and from both
I/O and memory, greatly simplifying system design.

In small systems the low-level details of the data


transfers are offloaded to the I/O controllers built into
the I/O devices.

21

7.4.1 I/O Control Methods - Direct


Memory Access (DMA)
1. CPU tells DMA the source
location, the number of bytes
to transfer, and the destination
location.
2. CPU proceeds to the next
task, and the DMA starts.
3. Once DMA is done, it
signals CPU with an interrupt

CPU can still access memory between IO traffic bursts.


22

7.4.3 I/O Bus Operations


Memory and IO busses are
often separated.
Memory bus is synchronous
for high speed.
I/O bus is asynchronous as it
needs to accommodate various
I/O devices. Some
communication protocols are
used.
23

7.4.3 I/O Bus Operations


This is a generic DMA configuration showing how the DMA
circuit connects to a data bus.

24

7.4.3 I/O Bus Operations


This is an example of how a bus connects to a disk drive.

25

7.4.3 I/O Bus Operations


A sample communication protocol for a disk drive write operation.

26

7.5 Data Transmission Modes


In parallel data transmission, the interface requires
one conductor for each bit.
Parallel cables are fatter than serial cables.
Compared with parallel data interfaces, serial
communications interfaces:
Require fewer conductors.
Are less susceptible to attenuation.
Can transmit data farther and faster.
Serial communications interfaces are suitable for timesensitive (isochronous) data such as voice and video.

27

7.6 Magnetic Disk Technology


Magnetic disks offer large amounts of durable
storage that can be accessed quickly.
Disk drives are called random (or direct) access
storage devices, because blocks of data can be
accessed according to their location on the disk.
This term was coined when all other durable storage
(e.g., tape) was sequential.

Magnetic disk organization is shown on the


following slide.

28

7.6.1 Rigid Disk Drives


Disk tracks are
numbered from
the outside edge,
starting with zero.

29

7.6.1 Rigid Disk Drives


Hard disk platters
are mounted on
spindles.
Read/write heads
are mounted on a
comb that swings
radially to read the
disk.

30

7.6.1 Rigid Disk Drives


The rotating disk
forms a logical
cylinder beneath the
read/write heads.
Data blocks are
addressed by their
cylinder, surface, and
sector.

31

7.6.1 Rigid Disk Drives


There are a number of electromechanical properties
of hard disk drives that determine how fast its data
can be accessed.
Seek time is the time that it takes for a disk arm to
move into position over the desired cylinder.
Rotational delay is the time that it takes for the
desired sector to move into position beneath the
read/write head.
Access time = seek time + rotational delay.

32

7.6.1 Rigid Disk Drives


Transfer time gives us the rate at which data can be
read from the disk.
Average latency is a function of the rotational speed:

Mean Time To Failure (MTTF) is a statisticallydetermined value often calculated experimentally.


It usually does not tell us much about the actual expected
life of the disk. Design life is usually more realistic.

Figure 7.15 in the text shows a sample disk specification.


33

7.6.2 Solid State Drives


Low cost is the major advantage of hard disks.
But their limitations include:

A million times slower compared to main memory


Fragility
Moving parts wear out
Power hungry

Reductions in memory cost enable the widespread


adoption of solid state drives, SSDs.
Computers "see" SSDs as jut another disk drive, but they store
data in non-volatile flash memory circuits.
Flash memory is also found in memory sticks and MP3 players.

34

7.6 Magnetic Disk Technology


SSD access time and transfer rates are typically
100 times faster than magnetic disk, but slower
than onboard RAM by a factor of 100,000.
There numbers vary widely among manufacturers and
interface methods.

Unlike RAM, flash is block-addressable (like disk


drives).
The duty cycle of flash is between 30,000 and 1,000,000
updates to a block.
Updates are spread over the entire medium through wear
leveling to prolong the life of the SSD.

35

Chapter 7 Conclusion
I/O systems are critical to the overall performance of a
computer system.
Amdahls Law quantifies this assertion.
I/O systems consist of memory blocks, cabling, control
circuitry, interfaces, and media.
I/O control methods include programmed I/O, interrupt-based
I/O, and DMA.
Magnetic disk is the principal form of durable storage.
Disk performance metrics include seek time, rotational delay,
and reliability estimates.

36

End of Chapter 7

37

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy