computer systems figure 5.1 the von neumann architecture

36
Computer Systems Computer Systems Figure 5.1 The von Neumann architecture

Upload: bryce-fleming

Post on 27-Dec-2015

223 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Computer Systems Figure 5.1 The von Neumann architecture

Computer SystemsComputer Systems

Figure 5.1 The von Neumann architecture

Page 2: Computer Systems Figure 5.1 The von Neumann architecture
Page 3: Computer Systems Figure 5.1 The von Neumann architecture

CPUCPU

Page 4: Computer Systems Figure 5.1 The von Neumann architecture

MemoryMemory

MemoryMemory A collection of cells,A collection of cells,each with a uniqueeach with a uniquephysical physical

address;bothaddress;bothaddresses andaddresses andcontents are in contents are in binarybinary

Page 5: Computer Systems Figure 5.1 The von Neumann architecture

RAM and ROMRAM and ROM

Random Access MemoryRandom Access Memory (RAM)(RAM)Memory in which each location can be accessed and Memory in which each location can be accessed and changed changed

Read Only MemoryRead Only Memory (R (ROM)OM)Memory in which each location can be Memory in which each location can be

accessed but accessed but notnot changed changedRAMRAM is volatile, ROM is not is volatile, ROM is not

What does volatile mean?What does volatile mean?

Page 6: Computer Systems Figure 5.1 The von Neumann architecture

Secondary Storage DevicesSecondary Storage Devices

Why is it necessary to have secondary Why is it necessary to have secondary storage devices?storage devices?

Can you name some of these devices?Can you name some of these devices?

Page 7: Computer Systems Figure 5.1 The von Neumann architecture

Magnetic TapeMagnetic Tape

The first truly mass The first truly mass auxiliary storage auxiliary storage device was the device was the magnetic tape magnetic tape drivedrive

Tape drives have aTape drives have amajor problem; canmajor problem; canyou describe it? you describe it?

Figure 5.4 A magnetic tape

Page 8: Computer Systems Figure 5.1 The von Neumann architecture

Magnetic DisksMagnetic DisksHistoryHistory

Floppy disks (Floppy disks (Why Why "floppy"?"floppy"?))

1970. 8" in diameter " 1970. 8" in diameter " late 1970, 5 1/2" late 1970, 5 1/2" 80’s, 3 1/2”80’s, 3 1/2”now near extinctionnow near extinction

Zip, removable drivesZip, removable drives

Tracks near center are more Tracks near center are more densely packed densely packed Why?Why?

Page 9: Computer Systems Figure 5.1 The von Neumann architecture

Magnetic DisksMagnetic Disks

Eric Gaba, Wikimedia Commons user Sting

Page 10: Computer Systems Figure 5.1 The von Neumann architecture

… … Amazing…Amazing…

““As an analogy, a magnetic head slider As an analogy, a magnetic head slider flying over a disk surface with a flying flying over a disk surface with a flying height of 25 nm with a relative speed of 20 height of 25 nm with a relative speed of 20 meters/second is equivalent to an aircraft meters/second is equivalent to an aircraft flying at a physical spacing of 0.2 flying at a physical spacing of 0.2 µµm at m at 900 kilometers/hour. This is what a disk 900 kilometers/hour. This is what a disk drive experiences during its operation.”drive experiences during its operation.” Magnetic Storage Systems Beyond 2000, George C. Hadjipanayis, p. 487Magnetic Storage Systems Beyond 2000, George C. Hadjipanayis, p. 487

Page 11: Computer Systems Figure 5.1 The von Neumann architecture

Magnetic DisksMagnetic Disks

Seek timeSeek timeTime it takes for read/write head to be Time it takes for read/write head to be

over right trackover right track

LatencyLatencyTime it takes for sector to be in positionTime it takes for sector to be in position

Access timeAccess timeSum of seek time and latency.Sum of seek time and latency.

Page 12: Computer Systems Figure 5.1 The von Neumann architecture

RAIDRAID

““redundant array of inexpensive redundant array of inexpensive disks”disks”

multiple disks look like one drive to multiple disks look like one drive to OSOS

uses:uses:– mirroringmirroring– stripingstriping– error detectionerror detection

Page 13: Computer Systems Figure 5.1 The von Neumann architecture

Flash memoryFlash memory

Non-volatile

limited number of read/write cycles (300K)

better shock-resistance than HD; faster access time

future: flash drives only?

Page 14: Computer Systems Figure 5.1 The von Neumann architecture

Compact DisksCompact Disks

CDCD A compact disk that uses a laser to read information A compact disk that uses a laser to read information storstored optically on a plastic disk; data is evenly ed optically on a plastic disk; data is evenly distributed around trackdistributed around track

CD-ROMCD-ROM read-only memory read-only memoryCD-DACD-DA digital audiodigital audioCD-WORMCD-WORM write once, read manywrite once, read manyRW or RAMRW or RAM both read from and written to both read from and written to

DVDDVD Digital Versatile Disk, used for storing audio, video, Digital Versatile Disk, used for storing audio, video, datadata

Page 15: Computer Systems Figure 5.1 The von Neumann architecture

Memory HierarchyMemory Hierarchy• Registers• Cache Level I, Level II• Main (RAM)• Auxiliary (Hard Disk, SSD (based on flash))

Access time and transfer rates depends on each type of memory.

Why not use fastest? (RAM: ns; SSD: µs; HD: ms)

Cost/speed tradeoff.

Caching techniques to gain advantage of fastest memory

Page 16: Computer Systems Figure 5.1 The von Neumann architecture

Flow of Information Flow of Information BusBusA A busbus is a subsystem that transfers data is a subsystem that transfers data

between computer components inside a between computer components inside a computer or between computers.computer or between computers.

Figure 5.2 Data flow through a von Neumann architecture

Page 17: Computer Systems Figure 5.1 The von Neumann architecture

BusBus

Page 18: Computer Systems Figure 5.1 The von Neumann architecture

The Fetch-Execute CycleThe Fetch-Execute Cycle

Figure 5.3 The Fetch-Execute Cycle

Page 19: Computer Systems Figure 5.1 The von Neumann architecture

Alternative ArchitecturesAlternative Architectures

Page 20: Computer Systems Figure 5.1 The von Neumann architecture

PipeliningPipelining

Arranges processors in sequence, Arranges processors in sequence, where each processor contributes where each processor contributes one part to an overall computation. one part to an overall computation.

- example utility…

Page 21: Computer Systems Figure 5.1 The von Neumann architecture

Example: non-pipelinedExample: non-pipelined

Compute (4x+8)/2 for list of data x.Compute (4x+8)/2 for list of data x. Assume we have three processors.Assume we have three processors. Sequential execution modelSequential execution model

Data x

3725168410

Processor 1 computes ((4)(3)+8)/2, then ((4)(7)+8)/2, ...

Processor 2

Processor 3

Page 22: Computer Systems Figure 5.1 The von Neumann architecture

Pipelined: compute Pipelined: compute (4x+8)/2(4x+8)/2Data x: 3, 7, 2, 5, 1, 6, 8, 4, 10

Time Processor 1(mult by 4)

Processor 2(add 8)

Processor 3(divide by

2)

1 4 x 3 idle idle

2 4 x 7 12 + 8 idle

3 4 x 2 28 + 8 20/2

4 4 x 5 8 + 8 36/2

5 4 x 1 20 + 8 16/2

6 4 x 6 4 + 8 28/2

7 4 x 8 24 + 8 12/2

8 4 x 4 32 + 8 32/2

9 4 x 10 16 + 8 40/2

10 idle 40+8 24/2

11 idle idle 48/2

Page 23: Computer Systems Figure 5.1 The von Neumann architecture

Distributed memoryDistributed memory

One approach to One approach to parallelismparallelism is to have multiple is to have multiple processors run on different (processors run on different (multiple) data setsmultiple) data sets

- might have same program running on separate data- might have different programs running on separate data- makes sense when data is cleanly separable for the purpose of the problem

Page 24: Computer Systems Figure 5.1 The von Neumann architecture

Example: compute sum of Example: compute sum of long list of numberslong list of numbers

First 10000 First 10000

numbersnumbersnext 10000 next 10000

numbersnumbersnext 10000 next 10000

numbersnumbersnext 10000 next 10000

numbersnumbers

last 10000 last 10000

numbersnumbers

divides up the numbersdistributes to difference processorsadds them all together at end

This model is relevant not only for parallel processing within a single computer, but in distributed computing across many different machines (e.g., in a data farm)

Page 25: Computer Systems Figure 5.1 The von Neumann architecture

Shared MemoryShared MemoryCommunicate through shared memory

• allows programs to leave messages for each other, e.g., to farm out part of a computation to other processors• need to be careful that processors don’t overwrite what each is doing• avoids redundant copies of data –

- except for caching and cache coherence problems

Page 26: Computer Systems Figure 5.1 The von Neumann architecture

Example SpecsExample Specs

http://www.apple.com/macbook-pro/http://www.apple.com/macbook-pro/specs-retina/specs-retina/

Page 27: Computer Systems Figure 5.1 The von Neumann architecture

Sizes in PerspectiveSizes in Perspective

Page 28: Computer Systems Figure 5.1 The von Neumann architecture

Input/Output UnitsInput/Output Units

Input UnitInput Unit A device through which data and programs A device through which data and programs fromfromthe outside world are entered into the the outside world are entered into the computer;computer;

How many can you name?How many can you name?

Output unitOutput unit A device through which results stored in theA device through which results stored in thecomputer memory are made available to thecomputer memory are made available to theoutside worldoutside world

How many can you name?How many can you name?

Page 29: Computer Systems Figure 5.1 The von Neumann architecture

InputInput

Page 30: Computer Systems Figure 5.1 The von Neumann architecture

Output devicesOutput devices

Page 31: Computer Systems Figure 5.1 The von Neumann architecture

Touch Screens - both I and OTouch Screens - both I and O

A touch screen (Randy Allbritton/ Photodisc/ Getty Images © 2003

Monitor responds to the Monitor responds to the user touching the screen user touching the screen with a stylus or fingerwith a stylus or finger

–ResistiveResistive–Capacitive Capacitive –Infrared Infrared –Surface acoustic wave Surface acoustic wave (SAW)(SAW)

Page 32: Computer Systems Figure 5.1 The von Neumann architecture

Touch ScreensTouch Screens

Resistive touch screen Resistive touch screen A screen made up of two layers of electrically A screen made up of two layers of electrically conductive material conductive material

– One layer has vertical lines, the other has horizontal One layer has vertical lines, the other has horizontal lines lines

– When the top layer is pressed, it comes in contact with When the top layer is pressed, it comes in contact with the second layer which allows electrical current to flowthe second layer which allows electrical current to flow

– The specific vertical and horizontal lines that make The specific vertical and horizontal lines that make contact dictate the location on the screen that was contact dictate the location on the screen that was touchedtouched

Page 33: Computer Systems Figure 5.1 The von Neumann architecture

Touch ScreensTouch Screens

Capacitive touch screenCapacitive touch screen

A screen made up of a laminate applied over a A screen made up of a laminate applied over a glass screen glass screen

– Laminate conducts electricity in all directions; a very Laminate conducts electricity in all directions; a very small current is applied equally on the four corners small current is applied equally on the four corners

– When the screen is touched, current flows to the finger When the screen is touched, current flows to the finger or stylus or stylus

– The location of the touch on the screen is determined by The location of the touch on the screen is determined by comparing how strong the flow of electricity is from each comparing how strong the flow of electricity is from each cornercorner

Page 34: Computer Systems Figure 5.1 The von Neumann architecture

Touch ScreensTouch Screens

Infrared touch screenInfrared touch screen

A screen with crisscrossing horizontal and vertical A screen with crisscrossing horizontal and vertical beams of infrared light beams of infrared light

– Sensors on opposite sides of the screen detect the Sensors on opposite sides of the screen detect the beams beams

– When the user breaks the beams by touching the When the user breaks the beams by touching the screen, the location of the break can be determinedscreen, the location of the break can be determined

Page 35: Computer Systems Figure 5.1 The von Neumann architecture

Touch ScreensTouch Screens

Surface acoustic waveSurface acoustic wave (SAW) (SAW)

A screen with crisscrossing high A screen with crisscrossing high frequency sound waves across the frequency sound waves across the horizontal and vertical axes horizontal and vertical axes – When a finger touches the surface, When a finger touches the surface,

corresponding sensors detect the corresponding sensors detect the interruption and determine location of interruption and determine location of the touchthe touch

Page 36: Computer Systems Figure 5.1 The von Neumann architecture

I/OI/O

Trend towards integration of I&OTrend towards integration of I&O– touch screen (input = stylus or fingers, touch screen (input = stylus or fingers,

output = monitor display)output = monitor display)– haptic devices (input = movement and haptic devices (input = movement and

positioning; output = tactile feedback)positioning; output = tactile feedback) Trend towards more user-engaged I&OTrend towards more user-engaged I&O

– DDR, Guitar Hero, Rock Band, iPhone, Wii, VR DDR, Guitar Hero, Rock Band, iPhone, Wii, VR helmets. Entertainment industry and HCI helmets. Entertainment industry and HCI fields driving innovation. Google glassfields driving innovation. Google glass

Man/machine interfaceMan/machine interface