engg1811 computing for engineersen1811/13s1/lects/week11a-comparch... · 2013. 5. 20. · computer...

51
ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 1 ENGG1811 Computing for Engineers Computer Architecture Sequential Computing Logical View of the Architecture The Computer as an Information Processor Parallel & Distributed Computing Embedded Systems RFID Tags

Upload: others

Post on 13-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 1

ENGG1811 Computing for Engineers

Computer Architecture

Sequential Computing

Logical View of the Architecture

The Computer as an Information Processor

Parallel & Distributed Computing

Embedded Systems

RFID Tags

Page 2: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 3

What is a Computer?

A computer is an electronic machine that accepts data (input),

manipulates the data according to some rules (process),

produce results (output) and stores the results for future use

(storage).

The electric, electronic, and mechanical equipment that makes

up a computer is called hardware.

Tasks are performed by the software.

COMPUTER

Process

Storage

Input Output

Page 3: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 4

Computer Architectures *

• Sequential Computing

(von Neumann* Architecture)

– Most computers use the stored-program concept

originally designed by John von Neumann in 1945.

– Here, memory holds data and instructions, CPU

fetches instructions from the memory and execute

them. The fetch/execute cycle:

• Instruction Fetch

• Instruction Decode

• Data Fetch

• Instruction Execution

• Result Return or Data Store

* John von Neumann (1903–1957), pioneer of the stored program concept

http://ei.cs.vt.edu/~history/VonNeumann.html

Page 4: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 5

Logical View of the

Architecture

Input/Output Devices

(lperipherals)

Input/Output Devices

(peripherals)

System Bus

Read Only

Memory Plug-in Cards

Random Access

Memory

Central Processing Unit

Input/Output Ports

Monitor

Hard Disk Keyboard and Mouse

..................................

..................... ...........

Data travels from one location to another within the computer on

an electronic pathway or circuit called a data bus.

Page 5: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 6

Old EDP idea of batch processing (60s)

Time-sharing (70s, 80s)

Personal Computing &

Client-Server model

(80s, 90s)

Cheap powerful PCs,

networking, mobile

devices 00s+

The Computer as an Information Processor

Page 6: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 7

Computer Architectures

• Parallel Computing

– Simultaneous execution of the same programmed

task on multiple processors in order to obtain faster

results.

– Two main types:

• single instruction/multiple data (SIMD): all processors

execute the same instructions at the same time, using

multiple data points

• multiple instruction/multiple data (MIMD): each

processor executes different instructions, using multiple

data points

Page 7: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 8

Computer Architectures *

• Parallel Computing (cont’d)

– Many algorithms are essentially sequential in nature. They

must be redesigned in order to make effective use of the

parallel hardware.

– Programs that work correctly in a single CPU system may not

do so in a parallel environment. Careful programming is

required in a parallel system.

– Software systems for parallel computers provide mechanisms

for (explicitly or implicitly) partitioning the overall problem into

separate tasks and allocating tasks to multiple processors.

– In general, easy to build parallel hardware but difficult to

design parallel software that can effectively exploit the

underlying hardware power

Page 8: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 9

Computer Architectures *

• Distributed/Grid Computing

– A single computational task is executed on more than one

computers.

– The aim is to solve massive computational problems by using

large numbers of heterogeneous computers and other related

resources, located in different places belonging to different

users, over a network(s).

– Unused computational resources can be utilised to solve

important problems

– Make it possible to have shared resources for special

computational needs

– SETI@home was a popular applications of distributed/grid

computing

Page 9: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 10

Computer Architectures *

• Computing Clusters –A computer cluster is a group of connected computers that work

together and appear as a single computer to a user(s)

–Clusters are used to provide increased reliability and

performance. They provide cheap and an effective alternative to a

supercomputer. A cluster of computers is sometimes referred to as

a server farm.

–Computing clusters/Grid computing is increasingly becoming

popular for computationally expensive scientific/business

problems like: drug discovery, financial modelling, earthquake

simulation, climate/weather modelling, etc

• Clusters Vs Distributed/Grid Computing: Clusters are

normally made of dedicated hardware (for clustering purposes).

Computers normally included in distributed/grid computing

environment are not dedicated hardware (they can also function as

stand alone systems).

Page 10: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 11

Embedded Systems

• An embedded system is a special-purpose computer system

designed to perform one or a few dedicated functions, often

with real-time computing constraints.

• It is usually manufactured as part of a complete device including

hardware and mechanical parts.

• Embedded systems control many of the common devices in

use today.

• Handheld computers share some elements with embedded

systems but are not truly embedded systems, because they

allow different applications to be loaded and peripherals to be

connected.

* the lecture notes on this topic are from the material available at,

http://en.wikipedia.org/wiki/Embedded_system

Page 11: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 12

Examples of Embedded Systems

• Audio like mp3 players and telephone switches for

interactive voice response systems

• Avionics, such as flight control hardware/software and

other integrated systems in aircraft and missiles

• Cellular telephones and telephone switches

• Industrial controllers for remote machine operation

• Engine controllers and antilock brake controllers for cars

• Home automation products, such as thermostats, air

conditioners, sprinklers, and security monitoring systems

• Household appliances, including microwave ovens,

washing machines, TV sets, DVD players and recorders,

digital musical instruments

• Medical equipment (especially those embedded in people!)

• Computer peripherals such as routers and printers

Page 12: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 13

Embedded Systems: Some Characteristics *

• Embedded systems are designed to do some specific

task, rather than be a general-purpose computer for

multiple tasks.

• They often run with limited computer hardware resources:

small or no keyboard, screen, and little memory.

• They often have real-time performance constraints that

must be met, for reasons such as safety and usability.

• In other words, performance constraints allow design

engineers to optimise by

– reducing the size and cost of the product, or

– increasing the reliability and performance.

Page 13: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 14

Embedded Systems: Some Characteristics

• The software written for embedded systems is often

called firmware, and is stored in read-only memory or

Flash memory chips rather than a disk drive. It often

runs with limited computer hardware resources: small

or no keyboard, screen, and little memory.

• Complexity of embedded systems varies from low,

with a single microcontroller chip, to very high with

multiple units, peripherals and networks mounted inside

a large chassis or enclosure.

Page 14: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 15

Embedded Systems: Reliability

• Embedded systems often reside in machines that are

– expected to run continuously for years without errors, and

– in some cases recover by themselves if an error occurs.

• Software is usually developed and tested more carefully than

that for personal computers

• Unreliable mechanical moving parts such as disk drives,

switches or buttons are avoided.

• Specific reliability issues may include:

– The system cannot safely be shut down for repair, or it is

inaccessible. Examples: space systems, undersea cables,

navigational beacons, and bore-hole systems, or

– The system will lose large amounts of money when shut down:

phone switches, factory controls, bridge and elevator controls,

funds transfer and market making, automated sales and service

Page 15: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 16

Radio Frequency Identification (RFID)*

• Radio-frequency identification (RFID) is an automatic identification method, relying on storing and remotely retrieving data using devices called RFID tags or transponders.

• An RFID tag is an object that can be applied to or incorporated into a product, animal, or person for the purpose of identification using radio waves.

• Some tags can be read from several metres away and beyond the line of sight of the reader.

* the lecture notes on this topic are from the material available at,

http://en.wikipedia.org/wiki/Rfid

Page 16: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 17

Radio Frequency Identification (RFID)

• Most RFID tags contain at least two parts.

– One is an integrated circuit for storing and processing

information, modulating and demodulating a (RF)

signal, and other specialized functions.

– The second is an antenna for receiving and

transmitting the signal.

• A technology called chip-less RFID allows for discrete

identification of tags without an integrated circuit, thereby

allowing tags to be printed directly onto assets at a lower

cost than traditional tags.

Page 17: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 18

RFID tags *

• RFID tags come in many varieties:

– passive

– active

– semi-passive

– etc …

• Passive tags require no internal power source, thus

being pure passive devices (they are only active when a

reader is nearby to power them).

• Active and Semi-passive tags require a power source,

usually a small battery.

Page 18: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 19

Active RFID tags *

• Unlike passive RFID tags, active RFID tags have their

own internal power source.

• Communications from active tags to readers is typically

much more reliable (i.e. fewer errors) than from passive

tags due to the ability for active tags to conduct a

"session" with a reader.

• Many active tags today have operational ranges of

hundreds of metres (far more than passive tags), and a

battery life of up to 10 years.

• Active tags may include larger memories than passive

tags, and may include the ability to store additional

information received from the reader.

• Active tags are generally bigger, caused by battery

volume, and more expensive to manufacture.

Page 19: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 20

Applications of RFID

• Passports

• Transportation payments

• Product tracking

• Animal identification

• Inventory systems

• Human implants

• Libraries

• Identification of patients and hospital staff

• See Wikipedia for more…

Page 20: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 21

RFID: Problems and concerns

• Lack of standards: frequencies used for RFID in the USA

are currently incompatible with those of Europe or Japan.

• Security concerns

– tags which are world-readable pose a risk to both personal

location privacy and corporate/military security

– illicit tracking of RFID tags

– cryptography could be used to prevent tag cloning/tracking

– RFID-enabled cards or passports can be shielded

• Privacy concerns:

– possible to gather sensitive data about an individual

without consent (owner may be unaware of the RFID tag).

– If a tagged item is paid for by credit card/loyalty card, then it

would be possible to indirectly deduce the identity of the

purchaser by reading the globally unique ID of that item

(contained in the RFID tag).

Page 21: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 22

ENGG1811 Computing for Engineers

Digital Revolution and Network Computing

Bits and Bytes, Encoding Numbers, Characters,

Instructions; Text, Sounds and Pictures

What is the Internet, Anyway?, Origins and

Development

Communication Types

How do LANs and the Internet Work?

Web Services

Cloud Computing

Page 22: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 23

Bits and Bytes

Each individual 1 or 0 is called a bit, binary digit

A byte is a group of 8 bits kilobyte (K or kb) = 1000bytes, 1 kibibyte (kiB) = 1024b

megabytes (MB) = 1000 kilobytes, 1 mebibyte (MiB) = 1024kiB

gigabytes (GB) = 1000 megabytes, 1 gibibyte (GiB) = 1024MiB

terabytes (TB) = 1000 gigabytes, 1 tebibyte (TiB) = 1024GiB

petabyte (PB) = 1000 terabytes, 1 pebibyte (PiB) = 1024TiB

exabyte (EB) = 1000 petabytes, 1 exbibyte (EiB) = 1024PiB

zettabyte (ZB) = 1000 exabytes, 1 zebibyte (ZiB) = 1024EiB

yottabyte (YB) = 1000 zettabytes, 1 yobibyte (YiB) = 1024ZiB

11000001

bit

11000001

byte

8 bits

About 1/2

page of plain text,

1000 bytes

kilobyte

About 500

page of plain text,

1000k ilobytes

megabyte

IEC binary

prefixes

Page 23: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 24

Encoding Numbers, Characters & Instructions

We can use different methods to encode lots of different kinds

of information on the two states

Binary numbers

5 0101

6 0110

Numeric Data

A 1000001

B 1000010

ASCII table

Text Data

Instructions

Computer

Instructions

10010011

11110101

………

……….

00101101

CPU

Page 24: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 25

Digitising Text *

• Original ASCII (The American Standard Code for Information Interchange) encodes letters, numerals, and other symbols as 7-bit binary representation.

• 7 bits in sequence yields 27 = 128 symbols. n bits in sequence yields 2n symbols.

• Later, extended 8-bit ASCII representation was introduced, to include characters used in European languages

• ASCII and its variations are popular and widely used

• However, such 8-bit representation is not enough to represent ALL languages

• 16-bit representation, called Unicode, provides more complete solution. 65,536 symbols can handle ALL languages.

• Unicode is now widely used by application programs and operating systems

Page 25: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 26

8-bit ASCII, The American Standard Code for Information Interchange

Figure 8.7 from the book “Fluency with Information Technology”, by

Snyder, L. (2004), Pearson Addison Wesley.

Page 26: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 27

Encoding Sounds and Pictures

We can use other methods

for converting sounds and

pictures...

Sound

10010011

11110101

………

……….

00101101

11010110

pixel

11010110 (8 bit colour value)

10010011

11110110

…….

……..

00101101

pixel

00110101

pixel

00110101

Image

OperaHouse.JPG

(or Operahouse.PNG, etc)

Page 27: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 28

Sound wave. The horizontal axis is time; the vertical axis is

sound pressure.

Figure 11.8 from the book “Fluency with Information Technology”,

by Snyder, L. (2004), Pearson Addison Wesley.

Page 28: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 29

Schematic for analog-to-digital and digital-to-analog conversion.

Figure 11.10 from the book “Fluency with Information Technology”,

by Snyder, L. (2004), Pearson Addison Wesley.

Ideally this data accurately represents the waveform, but sampling imposes practical

limitations: sample rate and quantisation

Page 29: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 30

Two sampling rates; the rate on the right is twice as fast as that on

the left.

Based on Figure 11.9 from the book “Fluency with Information

Technology”, by Snyder, L. (2004), Pearson Addison Wesley.

The limited

resolution of the

sampled sound

pressure value

(quantisation)

generates spurious

high-frequency

signals

Page 30: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 31

Quantisation and Sampling Rate

• An analogue value can only be approximated by a digital

representation. Limits apply in two parameters:

– accuracy of value representation (quantisation)

– how often samples are taken (for audio or video)

• Sampling rate should be at least twice the frequency of any

perceptible variation in value (the Nyquist-Shannon sampling

theorem)

• If sampling rate is too low, audible or visible effects occur.

This is called aliasing.

Imagine sampling the signal shown

at its fundamental frequency:

Audio standards provide for 8 bits per sample (x 2 for stereo),

sampled 44100 times per second (5.3Mb

per minute without compression)

quantisation

Page 31: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

Basics of audio sampling.

capturing audio:

http://www.youtube.com/watch?v=MHCjdTUt75k

converting to digital form

http://www.youtube.com/watch?v=kuVWs20_PLs

0:00 to 2:30, skip to 3:20 to 4:20, samples from 4:40

ENGG1811 © UNSW, CRICOS Provider No: 00098G Comp Architecture/Digital Revolution slide 32

Page 32: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 33

Digital Images and Video

• The main aim is to divide an image in pixels, and encode each

pixel using 3 x 8-bit values, one for red, green and blue

• Often use compression to store and transmit images.

Otherwise, even a small image requires lots of memory.

For example, 8 x 10 inch image scanned at 300 pixels per inch

requires 8*10*300*300 = 7.2 megapixels (x 3 bytes = over

21Mb)

• Compression formats are either lossless or lossy

– lossless: PNG, TIFF etc, achieve low compression rates

unless image has many uniformly coloured areas

– nearly lossless: GIF (max 256 different colours)

– lossy: JPEG (and MPEG video, MP3 audio etc)

Page 33: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 34

Lossless Compression

• Most use sophisticated algorithms, but all depend on

redundancy (repeated symbols) in the data (you can’t

compress random data!)

• Simple example, practical for images with large areas of

uniform colour: Run-Length Encoding

– reserve rarely-used symbol for run marker, say #

– count runs of n > 3 adjacent equal symbols

– replace run by #, the symbol and n as a single symbol

– runs shorter than 3 are not encoded, except…

– # as an input symbol must be encoded as ##1

– example using text characters:

• input: xxyzzzzzzzzxxxxxyxxyyyy#abc

• encoding: xxy#z8#x5yxx#y4##1abc

Page 34: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 35

Lossy Compression (JPEG)

• MPEG uses same DCT

algorithm: discrete

cosine transform

Blu

e L

ake, Kosc

iusz

ko N

ational Park

, D

ece

mber

2001.

Photo

© G

eoff W

hale

• Lossy compression uses the

fact that the eye (and ear)

cannot distinguish fine detail

Page 35: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 36

Encoding and Decoding

In general, we encode human-understandable

information into 1s and 0s (two states) for computer

processing and storage and then decode into human-

understandable form later

Text

Image

Sound

Information

Encoding

Word

Excel

PhotoShop

etc

File

10111001

11101101

…..

……

11101101

Decoding

Word

Excel

PhotoShop

etc

Text

Image

Sound

Information

Page 36: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 37

What is the Internet, Anyway? • Within a building or across a few buildings, small collections of

computers could be connected to form a local area network (LAN)

• Larger networks in a geographical area are called regional area

networks and, if many are linked, a wide area network (WAN)

Microwave link --------------------------- ------------------------ ------ Mainframe

Ring network --------------------------------

-------- High-speed cable bridging

regional networks

Eventually even these started connecting up via large, high-speed cable, microwave and satellite links, into a heterogeneous network of networks - the Internet!

Page 37: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 38

Origins and Development It began in the 1960s with the DARPA* military communication net...

Then was adopted by universities and research institutions

(1970s), then later by commercial interests (1980s onwards)…

* D

efen

se A

dv

ance

d R

esea

rch

Pro

ject

s A

gen

cy

Page 38: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 39

Communication Types Synchronous versus Asynchronous communication:

– Synchronous communication requires that both the sender and

receiver are active at the same time. For example, a telephone

conversation.

– In asynchronous communication, the sending and the receiving

occur at different times. For example, a postcard, an email, SMS,

answering machine/voice mail, etc.

Broadcast versus point-to-point communication:

– In broadcast communication, a single sender sends information

to many receivers. For example, TV and Radio broadcast.

Multicasting is similar, but normally receivers include a small

subset of the whole population

– Point-to-point communication, includes a single sender and a

single receiver. For example, a telephone communication

Importantly, computer networks provide general purpose

communication links that can be used for all the above

communication modes.

Page 39: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 40

How does the Internet Work?

Each computer connected to the Internet is given a unique address

called its IP address (Internet Protocol address). It contains 4 bytes

(each byte represents a number between 0 to 255), separated by

dots. For example, 128.95.1.207, 128.95.1.4, etc.

To increase the number of possible IP addresses, a new Internet

Protocol Version 6 (IPv6) is being developed. IPv6 uses 16 byte

IP-addresses, and provides a lot more addresses for current and

future demands. However, note that the current network systems

use IPv4.

A domain is a related group of networked computers.

Computer names and Domain names (instead of numbers in IP

address) are normally used to identify a particular computer on the

Internet. For example,

wagner.cse.unsw.edu.au

wagner is the computer name,

cse, unsw, edu and au are different domain names

Page 40: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 41

How does the Internet Work? *

Domain Name System (DNS) translates human-readable names

into the 4-number IP addresses.

DNS servers keep an up to date list of the symbolic names and

the corresponding IP addresses. Normally, DNS servers exist at

each domain level.

Some top-level domains:

.au for Australia, .ca for Canada, .de for Germany, .sg for

Singapore, etc.

edu for educational institutions, for example edu.au (but

ac.uk)

com for commercial institutions, for example com.au (but

co.uk)

gov for government agencies, for example gov.au

etc, etc …

If there is no country name (like au or ca ) at the end, it refers to

the USA (for example, www.cnn.com)

Page 41: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 42

How does the Internet Work? * The internet uses point-to-point communication, and therefore

we need to attach a destination address to every message.

When you send message across the Internet, it is broken up into

IP packets - each of which is addressed to the recipient.

IP packets (of the same message) may take different routes

across the Internet.

At the receiving end, IP packets (of the same message) are

reassembled to form the original message.

This is done according to the Transmission Control Protocol/

Internet Protocol (TCP/IP)

To:

[email protected]

(163.52.128.78)

DNS servers do this conversion

Page 42: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 43

The TCP/IP postcard analogy. * Figure 3.5 from the book “Fluency with Information Technology”, by Snyder, L. (2004),

Pearson Addison Wesley.

• Write long letter on several numbered postcards, send home over a few days

• Postcards arrive at different times, out of order

• The common address and numbering system means that the recipient can re-

assemble the letter, and determine if any part is missing

IP = mail system with its inevitable imperfections

TCP = protocol that re-assembles message packets, asks for retransmission etc

Page 43: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 44

A ping* from spiff.cseresearch.cs.washington.edu to eth.ch, took

18 hops

Fig 3.7 from the book “Fluency with Information Technology”, by Snyder, L. (2004),

Pearson Addison Wesley.

* echo request, named after the noise made by sonar echoes

Page 44: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 45

How does a LAN work? *

The Ethernet protocol is commonly used to connect

computers in a LAN

The Ethernet uses a different approach than the Internet.

Information is broadcast on the network along with the

recipient’s address. Every one on the network can see

this information, but only recipient collects it.

The Ethernet uses a broadcast network for point-to-point

communication. The Internet uses a point-to-point

network to implement point-to-point communication.

In the Ethernet, only one communication can take place

at a time (usually not a problem for LAN with less traffic)

Page 45: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 46

Connecting a Computer to the Internet *

Normally, every time you connect to your ISP, your home computer

is assigned a temporary IP address, using the Dynamic Host

Computer Protocol (DHCP), for use until you log out

If required, it is also possible (and most likely expensive) to assign a

fixed IP address to your computer. However, for most cases, DHCP

works fine.

At times, it is possible that the bottleneck is not the connection to

your ISP, but the Internet itself!

For example: 1 byte = 8 bits, so 56 bits = 7 bytes

At 56 Kbs (Kilo bits per sec), in 1 min,

we can transfer 7*60 kilo bytes = 420 Kb = 0.41Mb.

(Here, 420 Kb = (420/1024) Mb = 0.41 Mb)

Bits per sec Bytes per sec

56 kilo bits/sec 7 kilo bytes/sec 420 Kb 25 Mb

256 kilo bits/sec 32 kilo bytes/sec 1.9 Mb 113 Mb

512 kilo bits/sec 64 kilo bytes/sec 3.8 Mb 225 Mb

1 Mega bits/sec 128 kilo bytes/sec 7.5 Mb 450 Mb

5 Mega bits/sec 640 kilo bytes/sec 37.5 Mb 2.2 Gb

10 Mega bits/sec 1.25 Mega bytes/sec 75.0 Mb 4.4 Gb

1 min 1 hour

Data transfer in …..

Page 46: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 47

Web Services

• A web service is a software solution/service that could be accessed

by a program (or a user) from anywhere on the Internet.

• A typical web service accepts “input” in a predefined machine

readable form, and sends back “output” in a predefined machine

readable form.

• Web Services support application to application interactions over

a network.

• Web services are platform (Linux, Windows, etc) and language

(Visual Basic, Java, C, etc) independent.

• Web services allow easy integration of disparate software solutions

running under different software/hardware environments. For

example, we can easily link ready made software solutions running

under say Windows, Linux and Mac platforms (and of course

iPhone, Android, Nokia etc).

Page 47: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

• Using web services, software developers could use existing

software solutions from anywhere on the Internet!

• Web services are ideal for software solutions that require

specialised hardware and/or software (i.e. large amount of RAM,

very fast CPU, high reliability, etc).

• Universal Description, Discovery and Integration (UDDI) is a

registry where individuals and businesses could list their web

services, providing details on what they do and how to use them.

• Increasingly businesses use service-oriented architectures

(SOA), where different software/web “services” are “loosely”

connected to each other in order to achieve a final business goal(s).

• SOA allows businesses to use web services from anywhere on the

Internet.

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 48

Web Services

Page 48: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

Cloud Computing

• Cloud computing is Internet-based computing,

whereby users could use shared computing resources

(provided remotely by third parties) on-demand, allowing

flexibility of usage (i.e. increased computing power for

peak time).

• “cloud computing paradigm shift is similar to the

displacement of electricity generators by electricity grids”

- Nicholas Carr

• Clouds often appear as single points of access for all

consumers' computing needs.

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 49

* Lecture slides on this topic are based on the material available at http://en.wikipedia.org/wiki/Cloud_computing

Page 49: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

Cloud Computing

• A simple example:

– ACME* Engineering Solutions wants the following services:

• email

• document creation and storage

• appointment scheduling

• customer relationship management (CRM) facility, etc.

– ACME decides to use Google email, Google Applications (for

word processing, basic spread sheets, calendar, etc.) and

Salesforce.com for Customer Relationship Management tools

– All of the above applications/services are available on Google Cloud

– ACME does not need any local hardware/software to process and

store data (emails, documents, CRM, etc.).

– Employees only need an internet connection and a web browser.

* The one that Wily E Coyote is always buying products from in a vain

attempt to catch the Road Runner.

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 50

Page 50: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

Cloud Computing

• Benefits of cloud computing include:

– Cloud computing users can avoid capital expenditure on hardware,

software, and services when they pay a provider only for what they

use.

– low barriers to entry, low management overhead, immediate access

to a broad range of applications

– increased reliability, scalability, backup facility, security, agility, etc.

– device and location independence

• Deployment models: public, community and private cloud

• Some issues

– Privacy and security of (customer/business) data

– Compliance with regulatory bodies of different countries

– Possible use by hackers

ENGG1811 © UNSW, CRICOS Provider No: 00098G Digital Revolution slide 51

Page 51: ENGG1811 Computing for Engineersen1811/13s1/lects/week11a-CompArch... · 2013. 5. 20. · Computer Architecture Sequential Computing ... Client-Server model (80s, 90s) Cheap powerful

ENGG1811 © UNSW, CRICOS Provider No: 00098G Computer Architectures slide 52

Putting it together!

• Consider the following technologies:

– Embedded Systems

– RFID

– Wireless networks

– The Internet

– Powerful Servers/Computers

– Cloud Computing

– Smart Programs

• What can you achieve using the above technologies?