InputOutput Systems and Secondary Memory - PowerPoint PPT Presentation

1 / 70
About This Presentation
Title:

InputOutput Systems and Secondary Memory

Description:

Files may become fragmented over time, which causes data transfers to slow down ... In other words, the model is examined in response to questions of the form 'What ... – PowerPoint PPT presentation

Number of Views:115
Avg rating:3.0/5.0
Slides: 71
Provided by: jta95
Category:

less

Transcript and Presenter's Notes

Title: InputOutput Systems and Secondary Memory


1
Input/Output Systems and Secondary Memory
Lecture 7
2
Electronic Digital Computers
  • based on stored program design
  • processor system
  • CPU
  • memory
  • input/output system
  • input/output devices
  • secondary storage

Peripherals
Just about everything outside of the CPU/Main
Memory falls under the general classification of
a Peripheral Device
3
I/O Subsystem
  • Input/Output
  • exchanging data and instructions between
  • the user and the computer
  • The user may be a human being, but it may
  • also be a machine.like a car engine!
  • Secondary Storage
  • auxiliary storage for data and instructions

4
Secondary Memory (Storage)
  • Backup or alternative storage in place of
    (volatile) RAM
  • cheaper, mass storage for long term use
  • secondary memory devices (and media) are
    distinguished by their capacities, speed, and cost

5
Types of Access
  • RANDOM ACCESS
  • items are independently addressed
  • access time is constant
  • DIRECT ACCESS
  • items are independently addressed in regions
  • access time is variablethough not significantly
  • SEQUENTIAL ACCESS
  • items are organized in sequence (linearly)
  • access time is significantly variable

6
Memory Hierarchy I
7
Memory Hierarchy II
Flash Memory
8
Secondary Memory
  • SEQUENTIAL ACCESS STORAGE DEVICES AND MEDIA
    (SASD)
  • magnetic tape
  • DIRECT ACCESS STORAGE DEVICES AND MEDIA (DASD)
  • magnetic floppy disks
  • magnetic hard disks
  • optical discs (CD-ROM/DVD)
  • Flash Memory Cards

9
Magnetic Tape
  • stores data represented by magnetized particles
    in linear tracks
  • magnetized clusters or domains are aligned to
    represent binary codes

10
Longitudinal (9-track)
Magnetic Tape had a density of 6250 bits per inch
11
Tape Drives in action1950s-80s
12
Direct Access Storage Devices
  • magnetic hard and floppy disks
  • removable hard disks
  • optical discs
  • CD-ROM, CD-R, DVD
  • DVD-R

GEOMETRY TRACKS and SECTORS
13
Direct Access
  • SEEK controller advances read/write head to
    proper track
  • LATENCY waits for proper sector to rotate under
    head
  • READ/WRITE disk head scans the sector for read
    or write

14
Magnetic Disks
  • FLOPPY DISKS
  • 5.25 and 3.5 inch diskettes
  • 1.44 2.88 MBytes capacity
  • access drive speeds 600 r.p.m.
  • inexpensive, archival uses for small amounts of
    data
  • HARD DISKS
  • 3.5 inch has approx 3,000 tracks per side
  • multiple disk, sides (cylinders)
  • high capacity 1 Terabyte
  • access drive speeds 3,600 up to 7,200 r.p.m.
  • on-line storage

15
Floppy / Hard Disks
Hard Disk Drive
Floppy Diskfits in your shirt pocket !
16
Disk vs. File Organization
  • data is stored in blocks
  • blocks occupy sectors
  • sectors on tracks
  • files have names
  • files are indefinite in size
  • files may be updated (in part or whole)

Files may become fragmented over time, which
causes data transfers to slow down
17
Optical Discs
  • Compact DiscRead Only Memory (CD-ROM)
  • archived and published information
  • Relatively high capacity (650 Mbytes)
  • Compact DiscRecordable (CD-RW
  • recordable
  • readable using CD-ROM technology
  • Digital Versatile Discs (DVD)/DVD-R)
  • Very high capacity, read-only storages (5-15
    Gbytes)
  • Multiple Layers, tighter spacing in the same size
    as CD
  • Now BLUE RAY and DVD-HD! (3-10 times the capacity
    of todays DVDs)

18
Optical Drives Reading and Writing
  • discs are burnt one at a time
  • high intensity laser beam used for
    reading/recording pregrooved tracks
  • low intensity beam for reading/ higher intensity
    for burning

19
Flash Memory Cards
  • Non Volatile Solid State Memory
  • Small, Convenient and Reliable up to gt10K writes
  • Random Access
  • Relatively expensive in terms of cost/Mb
  • Prices dropping every day, capacity increasing!
  • Bridging the Gap between CD-ROM and Dynamic Memory

20
SanDisk Flash Card
One Gigabyte on a chip...and growing!
21
The future disk technology
  • Looks like a hard drive storage unit  but there
    are no moving parts inside.

22
Output Peripherals
  • video display monitors
  • monochrome and color
  • CRT and LCD
  • printers
  • character, line, and page
  • sound and voice output
  • MIDI synthesizers

23
CRT technology
  • cathode ray tube (CRT)
  • phosphors excited by electron gun beams
  • RGB composite color
  • horizontal scanning pattern to refresh phosphors

24
LCDs, How do they work?
  • Way too complex to describe here!
  • If you really want to know go to
  • www.howstuffworks.com/lcd1.htm

25
Printers
  • CHARACTER
  • dot matrix
  • low-cost, text and graphic printers
  • slow-speed, low quality
  • inkjet
  • medium-priced
  • general-purpose
  • PAGE
  • laser printers
  • high-quality
  • assortment of sizes, performance, and cost

26
Input Peripherals
  • keyboard
  • mouse
  • scanners (flatbed, slide, and drum)
  • digital cameras
  • sound digitizers
  • MIDI (Musical Instrument Digital Interface)
  • Video digitizers

27
Connecting all this stuff
  • Parallel Bus
  • Contains many signal paths for very fast data
    transfer
  • Bulkier, expensive cable and connectors
  • Limited distance capability
  • Serial Bus
  • Limited paths
  • Lower cost, lower size, lower weight
  • Longer distance (generally)

28
Parallel / Serial Bus
Flat Parallel Computer Cable
Serial Computer Cable
29
Where are parallel busses used?
  • All of the paths inside the CPU and between the
    CPU, main memory and video processor are
    implemented using parallel busses for the very
    fastest transfer rates.
  • Any plug in cards use parallel busses as well as
    internal magnetic and optical disk drives.
  • Most of these busses are either 16 or 32 bits wide

30
Where are serial busses used?
  • Serial busses are primarily used to connect
    external devices and peripherals. The data
    transfer rates of peripherals connected via
    serial are generally much slower than those
    connected by parallel.
  • Serial is convenient, relatively inexpensive and
    getting faster all of the time.
  • The current serial standard for peripherals is
    called USB 2.0

31
USB 2.0, Todays serial standard (2000)
  • Max transfer speed of 400Mbps (Megabits per
    second), 40 times faster than the predecessor USB
    1.1
  • Supports up to 127 devices connected to the same
    controller chip!
  • A USB cable can be 5 meters long without causing
    any performance problems
  • USB has become the ubiquitous serial connection
    standard for practically every external PC
    peripheral

32
IEEE 1394, aka Firewire
  • Another high speed serial bus in wide use is the
    Firewire bus, first introduced by Apple
  • Similar in performance to USB 2.0
  • Designed primarily for video devices such as
    camcorders, digital TVs, DVD devices and VCRs
  • Many PCs today also include Firewire for use with
    Video authoring software and downloading video
    onto your computer

33
USB 3.0!
  • Standard introduced in 2008
  • Up to 5 Gigabits per second!
  • 10 times faster than USB 2.0

34
Clocking Data
  • Both serial and parallel busses transfer data
    using a clock signal that ensures that data is
    sent and received at certain times based on the
    clock speed.
  • Without the clock, data transfers would be less
    reliable given the variation in cable length and
    other environmental factors

35
Questions?
36
Numeric Processingand SpreadSheets
(Excel)Lecture 7, Part II
37
  • First we thought the computer was a calculator.
    Then we found out how to turn numbers into
    letters with ASCII and we thought it was a
    typewriter. Then we discovered graphics, and we
    thought it was a television. With the World Wide
    Web, weve realized its a brochure.
  • -Douglas Adams

38
The problem with numbers
  • Storage space for numbers in computers is
    predetermined based on the size of the numbers
    specified in the computer program
  • Errors can occur!

39
Digital Number Representations
  • Integers
  • infinite discrete subset of the number line
  • are represented with a limited range
  • Decimal numbers (real numbers)
  • infinite and continuous
  • are represented with limited range and limited
    precision

40
Integer Storage
  • All integers between two values (one negative and
    one positive) are stored with exact precision
  • The specific values marking the range limits
    depend on the particular computer system being
    used
  • If calculations with integers give rise to
    numbers outside the allowable range, we say that
    an integer overflow error has occurred

41
Positive Integers
1101



8 4 0
1 13
42
Integer Addition in Binary
10010 18 1110
14 100000 32
43
Integers in a Finite Machine
  • In some current day machines an integer quantity
    is given 16 bits of space.
  • This means than when representing numbers as 16
    bit integers, we cannot represent any positive
    integer larger than 216. (65536) or /- 32767
  • If we try to represent larger numbers than we
    have bits available to represent them we get an
    Overflow condition

44
Real (Decimal) Number Storage
  • Real numbers are stored in floating point
    representation
  • a sign
  • an exponent
  • a mantissa (normalized decimal fraction)
  • no digits to the left of the decimal
  • first digit to the right of the decimal is
    nonzero
  • Limited precision because most real numbers have
    an infinite decimal expansion

45
Floating-point Numbers
sign-bit
Exponent
Mantissa
0
11111000001111111111111
11111111
  • 30 23 22
    0
  • MSB LSB

Most Significant Bit
Least Significant Bit
46
Example of fractional valuesin Binary
Binary Decimal Fraction Decimal
Value .1 1/2 .5 .01 1/4 .25 .001 1/8 .
125 .0001 1/16 .0625 .00001 1/32 .03125
47
Decimal Fraction Factored As... Binary 1/2 1/2
.1 1/4 1/4 .01 3/4 1/2 1/4 .11 1/8 1/8
.001 7/8 1/2 1/4 1/8 .111 3/8 1/4
1/8 .011 1/16 1/16 .0001 3/16 1/8
1/16 .0011 5/16 1/4 1/16 .0101
48
Real Number StorageLimited Range and Precision
  • There are three categories of numbers left out
    when floating point representation is used
  • numbers out of range because their absolute value
    is too large (similar to integer overflow)
  • numbers out of range because their absolute value
    is too small (numbers too near zero to be stored
    given the precision available
  • numbers whose binary representations require
    either an infinite number of binary digits or
    more binary digits than the bits available

49
Limited Range and Precision Some Consequences
  • Limited range will invalidate certain
    calculations
  • If integers are involved, this can often be
    avoided by switching to real numbers
  • For real number calculations, this problem arises
    infrequently and in those cases can sometimes be
    handled by special methods. It is not a common
    occurrence in non-scientific work.
  • Limited precision for real numbers is very
    pervasive
  • Assume that most decimal calculations will, in
    fact, be in error by a very small amount!
  • Evaluate and use computer calculations with this
    in mind

50
Real Number StorageLimited Range and Precision
Illustrated
51
Demousing Excel
52
Risks in Numerical Computing
  • Almost all complex computer numerical
    calculations involve roundoff error (limited
    precision error)
  • If not monitored and planned for carefully, such
    errors can lead to unexpected and catastrophic
    results
  • Arianne 5 Rocket Failure
  • Patriot Missile Failure during Gulf War

53
Spreadsheets
  • Spreadsheets are without doubt the way most users
    do numerical processing.

A B C
If I am changed, redo B4
106 231 111 448
1 2 3 4 5
B1B2B3
54
SpreadsheetsBrief History
  • First spreadsheets appeared in early 1980s
  • Visicalc was the first killer app for Apple
  • helped popularize personal computers
  • Basic Organization Hasnt Changed
  • computations organized on a two-dimensional
    worksheet
  • both built-in and user-supplied formulas used to
    facilitate computation

55
SpreadsheetsBasic Features
  • Worksheet Organization
  • rectangular grid of cells
  • cells are identified by the row (indicated by an
    integer) and column (indicated by a letter) in
    which they appear
  • Entering Data
  • one cell is active at a time (called the current
    cell)
  • a separate data entry bar is associated with the
    current cell
  • text, numerical data, dates, and formulas can be
    entered into the current cell through the entry
    bar

56
Worksheet OrganizationIllustrated
57
SpreadsheetsBasic Features (contd)
  • Formatting Data
  • variety of formats depending on the type of data
  • data format is associated with the cell and can
    be changed later
  • Using Formulas in a Worksheet
  • cell addresses (column, row) can be used like
    variable names in formulas
  • formulas begin with an or other special symbol
    (like _at_)

58
Using Spreadsheet FormulasAn Example
59
SpreadsheetsBasic Features (contd)
  • Copying (Replicating) Formulas
  • formulas can be copied to perform repetitive
    calculations
  • especially useful when similar calculations take
    place on a group (block,row, column) of
    contiguous data
  • Cell Referencing
  • cell references will be adjusted automatically
    when formulas are copied if relative cell
    addressing is used in formulas
  • cell references will remain the same if absolute
    cell addressing is used in formulas
  • relative cell addressing is the default
    addressing scheme

60
Copying Spreadsheet FormulasAn Example
The formula in cell B12 has been copied to cells
C12 and D12. Note how the cell references are
automatically adjusted.
61
SpreadsheetsAdditional Features
  • Using absolute references and problem parameters
  • Using built-in functions
  • Using logical functions
  • Displaying data in charts
  • Spreadsheets as decision support tools

62
Spreadsheet ModelsUsing Problem Parameters
  • Most spreadsheet models will require
    modifications over time as underlying assumptions
    and important problem values change
  • Good spreadsheet design will minimize the danger
    of making errors when updating spreadsheet models
  • Problem parameters are important problem values
    that are subject to change over time
  • Separating problem parameters, placing them in
    clearly identified cells, then referring to them
    by absolute references in formulas within the
    model makes changing them relatively error-proof

63
Spreadsheet ModelsDecision Support
  • Modeling problem parameters as clearly identified
    separate entities enables convenient what if
    analysis in spreadsheet models
  • What if analysis involves observing modified
    calculations and results when problem parameters
    change. In other words, the model is examined in
    response to questions of the form What if
    changes to ?

64
Spreadsheet ModelsUsing Built-in Functions
  • Built-in functions act on arguments to produce
    resulting values
  • A user of a built-in function need not know all
    the details of how the function does its
    calculation
  • The user needs to understand only what input
    arguments are required and what type of result is
    produced
  • An extensive library of financial and statistical
    functions adds powerful problem-solving
    capabilities for the average user

65
Spreadsheet ModelsUsing Built-in Logical
Functions
  • Logical functions allow spreadsheet models to
    make decisions during calculations
  • Such processing is called conditional processing
    and is a fundamental property of programming
    languages
  • For example, the IF function acts on a logical
    (or Boolean) expression to take one of two
    actions, as shown here

66
Spreadsheet ModelsDisplaying Data in Charts
  • Graphical display and summary of data is often
    easier to interpret than the raw data itself
  • Spreadsheets typically provide several types of
    charts
  • bar charts
  • pie charts
  • 3D Charts

67
Bar ChartAn Example
68
Pie ChartAn Example
69
3D Charts
70
Summary
  • Integers are stored with limited range real
    numbers (decimals) with limited range and limited
    precision
  • Almost all large decimal calculations involve
    round off errors because of limited precision
  • Spreadsheets provide powerful, yet easy to use,
    calculation environments
  • formulas and relative referencing provide for
    easy calculation extension
  • absolute referencing and problem parameters
    enable modeling
  • built-in functions (arithmetic and logical)
  • displaying data in charts
  • decision support tool
Write a Comment
User Comments (0)
About PowerShow.com