Top Banner
CSCI 6361: Topics in CSCI 6361: Topics in Mobile Computing Mobile Computing Dept. of Computer Science Dept. of Computer Science University of New Orleans University of New Orleans Fall 2004 Dr. Golden G. Richard III
234

CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Jan 11, 2016

Download

Documents

Edgar Ross
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

CSCI 6361: Topics in Mobile CSCI 6361: Topics in Mobile ComputingComputing

Dept. of Computer ScienceDept. of Computer ScienceUniversity of New OrleansUniversity of New Orleans

Fall 2004

Dr. Golden G. Richard III

Page 2: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

2

Intro to Mobile Computing: READIntro to Mobile Computing: READ

READ: ParcTab paper to get a feel for the challenges/potential of mobile/pervasive computing

READ: Chapter 1 of Richard book

Page 3: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

3

Ubiquitous, Mobile, NomadicUbiquitous, Mobile, Nomadic

Terminology not always consistent– Nomadic computing: “portable”; no

mobility while connected– Mobile computing: “on-the-go”, e.g., while

sitting on a train; possibility of network connections remaining open

– Pervasive or Ubiquitous computing:• computing everywhere… OR• computers everywhere…most of them invisible

Page 4: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

4

Computers EverywhereComputers Everywhere

Marc Weiser Vision of ubiquitous computing: hundreds of

computers per person, various sizes and capabilities

Tabs– very small--smart badge w/ user info, etc.– allow personalized settings to follow a user– leave bios behind at meetings– attached to virtually everything--e.g., books,

car keys, etc.

Page 5: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

5

Ubiquitous Computing: RealityUbiquitous Computing: Reality

Pads– “scrap computer” -- grab and use anywhere– arrange on a desk as you would sheets of paper– can project onto larger “computers” with a wave of

your hand– Write on pad, draw on it, pull up documents

Liveboards– Larger displays: whiteboard, personalized bulletin

board, etc.

Page 6: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

6

Reality (2)Reality (2)

Some of Weiser’s H/W predictions– Large displays, a fraction of a centimeter thick,

powered continuously for days on a small battery (no, no, no!)

– 1GHz processors (yes, yes, yes)– 16MB of memory on a single unit (easy, memory

is far cheaper than we could have imagined in 1991)

– Several GB of storage easily available (yes: we’ve done better than this)

So, we’re behind in displays, batteries

Page 7: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

7What does Mobile Computing Offer?What does Mobile Computing Offer?

A choice of work environments– In your garden (but watch out for birds!)– Coffee shops– In the field

Remote access to important data– Client’s office (no: "can I borrow your computer")– Meetings (e.g., quick access to statistics, reports)– Repair manuals, books, etc.– Translation facilities– In the grocery store!

Page 8: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

8

Offerings (2)Offerings (2)

Electronic note-taking While touring a new city

– Where am I? What is this building? How do I get to Lane Avenue? I’m hungry!

Diversion– E-books: stored, downloadable– Games: e.g., chess, solitaire, poker

Ubiquitous communication– email, Web– voice– video

Page 9: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

9

What About the Toys?What About the Toys?

A variety of computing and communication devices for mobile users– Watch-sized devices (and usually a watch!)– PDA (Personal Digital Assistants)– Multifunction cellular phones– Palm-sized computers– Wearable computers– Pads– Notebook computersm

ore

com

putin

g po

wer

Page 10: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

10

Portable Information AppliancesPortable Information Appliances

Car Stereo-Phone

(This slide courtesy of Sumi Helal @ The University of Florida)

Page 11: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

11

Case Study: Palm VIICase Study: Palm VII

Interfaces: serial, IR, 8Kb/sec Mobitex wireless Protocols: HTTP transactions only, through Palm.net proxy Processor: 16MHz Motorola Fireball (~ 68000 + video controller,

etc.) Memory: 2/8MB No expansion slots Screen: 160x160 pixels, monochrome Built-in applications: typical PDA (notes, calendar, etc.) Simple character-based handwriting recognition Runs PalmOS Software development: C, Java, various scripting languages Dimensions: 5.25” X 3.25” X 0.75”, 6.7oz

Page 12: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

12

Palm VIIPalm VII

Page 13: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

13

Case Study: Palm M515Case Study: Palm M515

Interfaces: USB, IR Processor: Faster: 33MHz Networking via IR or cable to a cellular phone Memory: 16MB Secure Digital (SD) expansion slot Screen: 160x160 pixels, 16bit color Built-in applications: typical PDA (notes, calendar, etc.) Simple character-based handwriting recognition Runs PalmOS 4.1 Software development: C, Java, various scripting languages Dimensions: 4.5” X 3.1” X 0.5”, 4.9oz

Page 14: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

14

Palm M505Palm M505

                                                                                   

                                      

Page 15: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

15

Palm AccessoriesPalm Accessories

Memory Games Books

Portable keyboards

Wireless LAN module ($$$$)

~$30/each

Page 16: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

16

Handspring Visor (Palm Derivative)Handspring Visor (Palm Derivative)

                                                                

“springboard” modules for expansion

camera

cellular

                

voice recorder

                         MP3 player

Page 17: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

17

Case Study: Palm Tungsten T3Case Study: Palm Tungsten T3

Interfaces: USB, IR Processor: 400MHz ARM-compatible Networking via IR or cable or Bluetooth to a cellular phone Memory: 64MB Secure Digital (SD) expansion slot Screen: 320x480 pixels, color Built-in applications: typical PDA (notes, calendar, etc.) Simple character-based handwriting recognition Runs PalmOS 5.2.1 Software development: C, Java, various scripting languages Dimensions: 4.3” X 3” X 0.6”, 5.5oz Price: ~$399

Page 18: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

18

Case Study: HP/Compaq IPAQCase Study: HP/Compaq IPAQ

Interfaces: USB, IR, Bluetooth, CF, Secure Digital, PCMCIA Processor: 206+MHz StrongARM CPU Networking via CF or PCMCIA or Bluetooth interfaces Memory: 32MB ROM + 64MB RAM + CF or SD expansion Screen: 320x240 pixels, 16bit color Built-in applications: typical PDA (notes, calendar, etc.) +

Pocket Word, Excel, Internet Explorer, etc. Character-based or script handwriting recognition Runs Windows CE or Linux Software development: VB, C, Java, various scripting languages Dimensions: 5.3" x 3.3" x .62“, 6.7oz Devices like this: $300-$1000 + lots of expansion options

Page 19: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

19

Case Study: Sony VAIO PicturebookCase Study: Sony VAIO Picturebook

733MHz Crusoe (Pentium-compatible)256MB / 20GB8.9” 1280x600 screenBuilt-in digital camera, 1394 interface¾ size keyboard1 PCMCIA slotWindows/Linux, etc.~$2000 when last available

Page 20: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

20

Tiny ComputersTiny Computers

16MB 66MHz 486SXused as a web server

See http://wearables.stanford.edu/

Page 21: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

21

M1/M2 DisplaysM1/M2 Displays

320x240 (M1, $500) 800x600 (M2, ~$5000)

Page 22: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

22

Wearable ComputingWearable Computing

The inventor of wearable computing: Steve Mann. See http://wearcam.org/mann.html

Page 23: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

23

TodayToday

Page 24: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

24Batteries Suck: Network Cables Batteries Suck: Network Cables or Power cables?or Power cables?

And bird poop is bad.

Page 25: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

25

Characteristics of Mobile DevicesCharacteristics of Mobile Devices

Resource-poor compared to their desktop counterparts– Limited processing power

– Limited battery life

– Limited network connectivity

– Poor availability…they sleep a lot!

– Poor display resolution (except notebooks)

– Tedious data input (except notebooks)

Page 26: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

26

Characteristics (2)Characteristics (2)

Resource poor...– Not very expandable

• Our condolences to the landfills...

– Peripherals traded for mobility, so...– One device typically doesn’t do it all…

• Poor compatibility between devices• Functionality is often duplicated• “work belt” syndrome for the mobile computing

nerd• Bluetooth will help, but bandwidth limited

Service discovery and better device cooperation to overcome poverty

Page 27: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

27

Characteristics (3)Characteristics (3)

Limitations are a result of tradeoffs between portability and horsepower:– Very small size limits traditional I/O methods

• New ones: handwriting recognition, voice input• Must work well or extreme frustration...• Must work with other people present!!

– Batteries weigh more than any other component in most mobile devices

• Smaller batteries, less power• CPU speeds reduced to conserve power

Page 28: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

28

Characteristics (4)Characteristics (4)

Notebook computers fare better in the comparison with desktops because form factor isn’t so restrictive– Reasonable screen size– Decent keyboards– Mouse substitutes– Ample memory

But even a 4lb notebook is too tedious to carry everywhere--and too inconvenient to use quickly

Page 29: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

29

Mobile Computing ChallengesMobile Computing Challenges

Challenges in mobile computing directly related to the resource-poor nature of the devices…

Mobile computing isn’t a simple extension of distributed computing– Hostile environment– Power-poor– Poor (or no) network bandwidth– Higher error rates– Variable latency– Frequent disconnection– Mobility

Evil for network protocolsbuilt for traditional wired

networks

Page 30: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

30

Challenges (2)Challenges (2)

Result: Must rethink many issues; can’t just “plug in” classic distributed systems theory

Disconnection <> Crashed! Adaptability to deal with varying conditions

– Transcoding proxies--scale content (e.g., images) to match available bandwidth

– Mobile proxies to convert content (e.g., Postscript ASCII)

– Agent systems for information access– More clever ways of checking for data consistency– Application callbacks to monitor conditions

(network, battery power, etc.)

Page 31: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

31

Proxies, ProxiesProxies, Proxies

Postscript

to text proxy

Post

scrip

t

Text

Page 32: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

32

AdaptationAdaptation

application entirely responsible for reacting

(or not) to changing conditions

system entirelyresponsible for reacting

(or not) to changing conditions; “protects” application

level of application adaptability

none

full

system/application cooperation

Page 33: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

33

More ChallengesMore Challenges

Cache! Cache! Cache! When possible, allow the risk of inconsistent data

– even if it requires human intervention to fix Prevalent network protocols require work to give

good performance for wireless– Schemes for mobility– TCP hacks

Schemes for intelligent handoff between network interfaces– Tradeoffs between cost, bandwidth, availability

Page 34: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

34

Wireless NetworkingWireless Networking

Issues: – Technologies

• What makes the bits fly?• Can we afford it?• Currently, no single technology will cut it• Handoff seems essential

– How do we run traditional applications over these technologies?

– What works well?– What needs more work?

WAN: Wide Area Network MAN: Metro Area Network LAN: Local Area Network PAN: Personal Area Network

Page 35: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

35

Wireless Networking TechnologiesWireless Networking Technologies

Satellite (WAN) Microwave (MAN) Broadband Wireless (MAN) Laser (MAN) Cellular (WAN) Bluetooth (Wireless PAN) IrDA (Wireless point-to-point PAN) Wireless LANs

– 802.11 standards (e.g., Lucent WaveLAN)

Page 36: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

36

Global Wireless InfrastructureGlobal Wireless Infrastructure

Satellite

Macro-CellMicro-Cell

UrbanIn-Building

Pico-Cell

Global

Suburban

dik ©

Slide courtesy of Sumi Helal @ UFL

Page 37: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

37

Wireless: ProblemsWireless: Problems

Typically much slower than wired networks– “State of the art” wireless LAN: 54Mb/sec– Wired LAN: 10000Mb/sec+

Higher transmission bit error rates (BER) Uncontrolled population Difficult to ensure Quality of Service (QoS) Asymmetric bandwidth Limited communication bandwidth aggravates

the problem of limited battery life

Page 38: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

38

SatelliteSatellite

GEO (Geosynchronous/Geostationary)– Remains "stationary" relative to equator– Deployed @ 36,000 km—requires a big rocket!– Need only 3 to cover earth– High latency (1/4 sec or so round trip)– Need high-power transmitter to reach satellite

Arthur C. Clarke: 'How I lost a billion dollars in my spare time‘

XM Satellite radio uses GEOs (only 2, tho)

Page 39: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

39

Satellite (2)Satellite (2)

LEO (Low Earth Orbit)– Much lower orbits—less than 1000 km– Must have handoff mechanism—don't

appear stationary to earthbound base stations

– Lower power transmitter than GEO– Lower latency, but handoff delay…– Space junk!

MEO (Middle Earth Orbit)– ~10,000 km

Page 40: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

40

Satellite: DirecPC/DirecWAYSatellite: DirecPC/DirecWAY ~400Kb/sec downlink from GEO Previously, modem uplink, but now 2-way Dish must see the sky (typical of satellite) Blech…169MB (1-4 hours) threshold (at last check??) HUGE latency compared to DSL or cable modems Last resort only!

Page 41: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

41

MicrowaveMicrowave

Range: 20 miles or more, typically less Line of sight only, point to point Rain causes problems, because rain absorbs

microwave energy Ethernet speeds Ducks won't fry

Page 42: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

42

LaserLaser

High-speed systems exist: 155Mb/sec Line of sight only, ~300m for Jolt Relatively high cost (One complete 155Mb/sec system for $24K,

last time I checked)

Page 43: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

43

Brief Survey of "Cellular"Brief Survey of "Cellular"

CDPD – Cellular Digital Packet Data– Transmit digital data over existing cellular network– 19.2Kb/sec– Uses idle channels in the cellular network

Mobitex – Ericsson technology– ~8Kb/sec, fairly high latency (4-8s RTT!)– Systems exist in US, Europe but Palm VII is US-only– Migrating to 19.2Kb?

GSM– Most European – 9600bps– Limited coverage in U.S.

Page 44: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

44

UMTSUMTS

Universal Mobile Telecom System International Initially up to 2Mb/sec Support for IP Quality of Service (QoS) guarantees Enables mobile multimedia, other bandwidth-

intensive applications Widespread deployment by 2005 See http://www.umts-forum.org for more info

Page 45: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

45

Sprint PCS plansSprint PCS plans

Late 2002 2004+??

Page 46: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

46Don’t Throw Away Your DSL Don’t Throw Away Your DSL Yet!Yet!Bandwidth is shared by users within a

particular cell (1-4 miles across)For Sprint, I’m currently getting

~90Kb/sec.Cost?Depends on who you talk to and if the

rules hold up$30-$100 per month for unlimited data

Page 47: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

47

Ricochet by Metricom– 128Kb/sec service in select areas– In practice, ~70Kb ?– Frequency-hopping system– Shoebox-sized units mounted on street lights– Draws power from light– One pole-mounted unit every ¼ to ½ mile, checkerboard pattern

Rest In Peace (RIP) in 2001 but now it’s back $75/month flat during initial lifetime, now $24.95/month flat Modem is now free Ricochet purchased by Aerie networks, now YDI? Network is mostly dark, but alive again in Denver and San

Diego Cost has decreased substantially, but limited availability ~7000 customers in 2004

128Kb "Everywhere": Metricom128Kb "Everywhere": Metricom

Page 48: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

48

Wireless LANsWireless LANs

One example: IEEE 802.11 standard CSMA/CA instead of CSMA/CD, as in Ethernet Ethernet: detect collision during transmission Wireless: impossible: can only hear own signal during

transmission Current speeds 1Mb/sec – 54Mb/sec Access point / NIC prices have recently dropped

substantially 802.11b: 2-11Mb/sec (we have this) in 2GHz range 802.11a: 54Mb/sec in 5GHz range (incompatible

with 802.11b, very dependent on line of sight) 802.11g: ~20Mb/sec, compatible with 802.11b

Page 49: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

49802.11a Faster…but line of sight-sensitive!802.11a Faster…but line of sight-sensitive!

Source: WWW

Page 50: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

50

802.11 Details802.11 Details

Medium-range wireless local area network technology 2.45GHz Industrial, Scientific, Medical (ISM) Band Old: 1Mb/sec , now: 2 - 54Mb/sec transmission speeds Older 1Mb/sec spec used Frequency Hopping Spread Spectrum

(FHSS)– Units change frequency rapidly according to an agreed

channel hopping sequence– Helps to reduce interference

Higher data rates use Direct Sequence Spread Spectrum (DSSS) Radio– Units broadcast a broad, redundant signal that is resistant to

interference US: 11 distinct channels (partially overlapping) Three channels (1, 6, 11) do not overlap at all

Page 51: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

51

Representative ProductsRepresentative Products

Orinico (Lucent) Silver cards– < $100

Orinoco (Lucent) Access Point– ~ $300-700 per AP

Residential wireless routers w/o bridging– Under $100– No roaming, for single AP (e.g., home)

deployment Apple Airport products

– Under $150– Newest supports streaming audio

Page 52: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

52

802.11: The Big Picture802.11: The Big Picture

Access Point

Access PointAccess PointAccess PointAccess Point

Access Point

"Distribution System" == wired network

Basic Service Set (BSS) ==area served by one access pointLaptop computer

Laptop computer

Laptop computer

Laptop computer

Extended Service Set (ESS) == service area provided by multipleaccess points

Laptop computer

Page 53: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

53

Or…Ad-hoc ModeOr…Ad-hoc Mode

Laptop computer

Laptop computer

Laptop computer

Basically, just one BSS with direct, broadcast-based communication--no access point

Laptop computer

Page 54: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

54

How Far? 802.11b Wavelan SpecsHow Far? 802.11b Wavelan Specs

Completely Open Environment

525 ft 885 ft 1300 ft

Semi-open Environment 165 ft 230 ft 300 ft

Closed (floor-to-ceiling brick) 80 ft 115 ft 130 ft

Environment 11Mb/sec 5.5Mb/sec 2Mb/sec

Page 55: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

55Card/Access Point Communication: Card/Access Point Communication: Joining a BSSJoining a BSS

Beacons from AP(periodic synchronization transmission,

contains info to synchronize clocks, supported data rates,

Traffic Indication Map [TIM])

Probe Request(request for synchronization information

for a desired ESS identifier)

Probe Response(response with synchronization information)

Passive

Active

Page 56: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

56

Authentication/AssociationAuthentication/Association

Authentication: “Always allow” or challenge/response and/or “is your MAC address OK?” (security issues later)

Association Request/Response: negotiation to allow a mobile host to “join” an access point

Reassociation disassociates with “current” access point and moves to another (allows roaming)

Card can listen for beacons from other access points to determine stronger signals

Page 57: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

57Moving PacketsMoving Packets

If packet is addressed to a mobilehost that is served by this access point,then broadcast it.

Otherwise, drop it on the “distribution system”network for delivery to another accesspoint or another destination.

Access points act as bridges that serve their set of mobile hosts

Page 58: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

58

Distributed Coordination FunctionDistributed Coordination Function

Ethernet uses CSMA/CD (Carrier Detect Multiple Access/Collision Detection)– Listen to medium– If quiet, begin transmission, but listen– If transmission is garbled, backoff and retry

Not feasible with wireless Not all stations can hear each other! Transmission drowns out signal of other radios

Page 59: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

59Distributed Coordination Function (2)Distributed Coordination Function (2)

802.11 uses CSMA/CA (Carrier Detect Multiple Access/Collision Avoidance)– Wait, then listen to medium– If quiet for specified duration, begin transmission, otherwise

wait again– After transmission, wait for explicit ACK, if no response, wait,

retransmit– Can also use RTS/CTS to combat hidden terminal problem– RTS contains source, destination, duration info– Request To Send reserves near sender, Clear To Send

reserves medium near receiver– RTS/CTS functionality rarely used in production systems

Page 60: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

60

802.11: Future802.11: Future

Revisions to standards for security 802.1X / 802.11i (later) We were looking at 802.11b 802.11a: 54Mb/sec, 5GHz 802.11g: ~20Mb/sec, compatible w/ 802.11b 802.11a has more non-overlapping channels

than 802.11b– 802.11b 3 non-overlapping channels– 802.11a channels do not overlap

Page 61: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

61

HiperlanHiperlan

European standard: Hiperlan/2 Operates in 5GHz range of 802.11a “Problem”: 5GHz currently reserved for Hiperlan Same access point-oriented topology as 802.11 30-50m (~90-150ft) range ~25Mb/sec peak data rate Connection oriented—AP governs data rates, etc. so QoS

guarantees can be made (unlike 802.11) DES/Triple DES encryption Supports digital certificates for authentication Time Division Multiple Access (TDMA)—units transmit in

certain slots Info source: Hiperlan/2 Forum Whitepaper: “HiperLAN/2 – The Broadband Radio

Transmission Technology Operating in the 5 GHz Frequency Band”

Page 62: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

62

802.11a, 802.11b, … Hiperlan802.11a, 802.11b, … Hiperlan

Does it matter for a particular user? A bit. For general purpose computing, user would need cards

for any wireless network she is likely to encounter At worst:

– 802.11a/b/g card for US– Many laptops now have integrated a/b/g– In US, 802.11b is currently the most important 802.11 protocol

your devices should support– Hiperlan for Europe??

Other differences affect applications… E.g., no QoS in 802.11, but do have it in Hiperlan

Page 63: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

63

Bluetooth: GoalsBluetooth: Goals

Provide small, inexpensive, power-conscious radio system

Short rangeBluetooth says, “…cables! Bah!”Personal (short-range) ad-hoc networksDevice communication and cooperationNot really intended as a wireless LAN

technology, but it’s being used as such

Page 64: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

64

Who is Bluetooth?Who is Bluetooth?

Danish king Bluetooth II (940-981) Lived to a ripe old age (~ 70 years) First baptized Danish king Significance in this context? The "Blue" in IBM?

– Deep Blue– Deeper Blue– Big Blue…

The Ericsson Scandinavian connection?

Page 65: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

65

Bluetooth HardwareBluetooth Hardware

Predicted long term cost: < $5/unit (in the short term, more)

Page 66: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

66

Bluetooth HardwareBluetooth Hardware

Low-cost radio operates in the 2.4GHz band Maximizes international acceptance… …except in France?! Well… Bluetooth ~1Mb/sec over several meters Range can be extended with an external

power amplifier Up to 7 simultaneous links ~75 hours voice – 3 months standby w/

600mAh battery

Page 67: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

67

Bluetooth Protocol StackBluetooth Protocol Stack

RadioRadio

BasebandBaseband

AudioAudio LMPLMPL2CAPL2CAP

RFCOMMRFCOMM

TCSTCS

SDPSDPOBEXOBEX

vCard, etc.vCard, etc.

     

Page 68: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

68

The Cordless DesktopThe Cordless Desktop

!!!!Ummm..no.

Page 69: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

69

Goodbye Cables…Hello CooperationGoodbye Cables…Hello Cooperation

Joe: 555-1287

Gotta remember to tell the pager Joe’s number changed...

XX

X

Page 70: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

70

““Send” and Forget...Send” and Forget...

Page 71: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

71

"Last hop" Network Access"Last hop" Network Access

TDK's 8 node Bluetooth Access Point

Page 72: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

72

Piconets / ScatternetsPiconets / Scatternets

piconet A

Max eight active devices per piconet—one masterParking allows more devices to be addressed

piconet B

Page 73: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

73

Bluetooth Kills Trees...Bluetooth Kills Trees...

$200 for a paper copy + $50 shipping…1500+ pages!Quite readable, but loooooooooong!

Page 74: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

74

Aside: Bluetooth vs. IrDAAside: Bluetooth vs. IrDA

IrDA: Line of sight vs. omnidirectional BT– IrDA has advantages and disadvantages– Low-tech security for data transfer…

• E.g., business cards

– Inconvenient for Internet bridge solutions– Connected IrDA devices must remain relatively

stationary– Higher bandwidth than Bluetooth (4-16Mb/sec)– Similar high-level standards (e.g., OBEX)– But Bluetooth supports multipoint communication– Current costs for deployment of IrDA are much

cheaper (< $2/unit)

Page 75: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

75

Bluetooth Device Connection StatesBluetooth Device Connection States

Standby – waiting to join a piconet Inquire – looking for other Bluetooth devices Page – connecting to a specific device Connected – actively involved in a piconet Hold – power conservation state

– Internal timer runs, connection maintained

Park – power conservation state– Connection "broken" – forgets member address,

but can be reactivated

Page 76: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

76

Bluetooth StatesBluetooth States

StandbyStandby

InquiryInquiry PagePage

TransmitTransmitConnectedConnected

ParkPark HoldHoldpower conservation

idle

Page 77: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

77

Bluetooth SecurityBluetooth Security

Authentication– Prevents unauthorized access to data on a

Bluetooth device

Encryption– Secure transfers, prevent eavesdropping

Frequency Hopping– Makes snooping more difficult...

Limited Range– Makes snooping more obvious!

Page 78: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

78

Bluetooth Security (2)Bluetooth Security (2) Each Bluetooth device:

– 48 bit 802-style unique identifier– 128 bit private authentication keys– 8 to128 bit private encryption keys (configurable in

hardware)– 128 bit random number per transaction

Radios negotiate encryption strength No governmental restrictions on authentication… Encryption is a different story Link-level security in Bluetooth authenticates the

device, not the user

Page 79: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

79

Bluetooth Security (3)Bluetooth Security (3)

Pairing installs a common secret key for authentication

Assumes access to both devices at the same time

Can also enter PIN at connection setupChallenge/response for authenticationEncryption keys generated from

authentication keys

Page 80: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

80

Bluetooth: ConcernsBluetooth: Concerns

Frequencies overlap 802.11 standard "Always on" may cause problems, worries FAA (Take the train!) Definitely need integration with software, not just

hardware compatibility 1Mb/sec isn't fast enough for some

applications… …and it definitely isn’t enough to replace all

cables (monitor, USB, SCSI, etc.) But next generation spec may hit 2-20Mb/sec Bluetooth SDP (Bluetooth’s service discovery

protocol) isn’t very sophisticated

Page 81: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

81Wireless Networking: Systems IssuesWireless Networking: Systems Issues

It’s not all about the hardware Extensions to support mobility

– Mobile IP Wireless network protocols

– Primarily hacking TCP– Brief review of TCP, then what breaks under

wireless• Without mobility• With mobility

This sets the stage..then we’ll look at the theory behind location management in detail

Page 82: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

82

LinkLayer

Network Layer

Transport Layer

Application Layer

TCP, UDP

IP

Telnet, FTP, etc.

TCP/IP IssuesTCP/IP Issues

Page 83: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

83

Why Mobile IP?Why Mobile IP?

Need a protocol which allows network connectivity across host movement

Protocol to enable mobility must not require massive changes to router software, etc.

Must be compatible with large installed base of IPv4 networks/hosts

Confine changes to mobile hosts and a few support hosts which enable mobility

Just hacking DNS won’t work– DNS updates take time– Hooks for normal users to update DNS won’t be accepted by

administrators– After DNS lookup, raw IP address is used by TCP, UDP, …

Page 84: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

84

Mobile IP Discussion OverviewMobile IP Discussion Overview

Will cover:– Why IP routing breaks under mobility– Mobile IPv4 basics– Some Mobile IP security issues

Won't cover:– Details of IP routing– IPv6 in detail– Low-level protocol details (message formats,

headers, etc.)– All of the Mobile IP-related security issues

Lots more detail in the specifications

Page 85: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

85

Internet Protocol (IP)Internet Protocol (IP)

Network layer, "best-effort" packet delivery Supports UDP and TCP (transport layer

protocols) IP host addresses consist of two parts

– network id + host id By design, IP host address is tied to home

network address– Hosts are assumed to be wired, immobile– Intermediate routers look only at network address– Mobility without a change in IP address results in

un-route-able packets

Page 86: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

86

IP Routing Breaks Under MobilityIP Routing Breaks Under Mobility

Why this hierarchical approach? Answer: Scalability!Millions of network addresses, billions of hosts!

137.30.2.*

.50 .52 .53

router

router

139.20.3.*

.200

Page 87: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

87

Mobile IP: BasicsMobile IP: Basics Proposed by IETF (Internet Engineering

Task Force)– Standards development body for the Internet

Mobile IP allows a mobile host to move about without changing its permanent IP address

Each mobile host has a home agent on its home network

Foreign agents on remote networks also assist

Mobile host establishes a care-of address when it's away from home

Page 88: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

88

Mobile IP: Basics (2)Mobile IP: Basics (2)

Correspondent host is a host that wants to send packets to the mobile host

Correspondent host sends packets to the mobile host’s IP permanent address

These packets are routed to the mobile host’s home network

Home agent forwards IP packets for mobile host to current care-of address

Mobile host sends packets directly to correspondent, using permanent home IP as source IP

Page 89: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

89

IP header

Aside: IP-in-IP TunnelingAside: IP-in-IP Tunneling

Packet to be forwarded is encapsulated in a new IP packet

See RFC 2003 for details In the new header:

– Destination = care-of-address– Source = address of home agent– Protocol number = IP-in-IP

IP headerdata IP header

datadata area

Page 90: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

90

Mobile IP: Basics (3)Mobile IP: Basics (3)

home agentcorrespondent host

Home LAN

Page 91: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

91

Protocol MessagesProtocol Messages

Extensions to ICMP Agent advertisement

– “I’m a foreign agent…”– “I’m a home agent”– Agent advertisements seen by mobile hosts on

their home network welcome them back…home

Agent solicitation– Mobile host actively seeks foreign agent– Elicits agent advertisement message

Page 92: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

92

Protocol Messages (2)Protocol Messages (2)

Registration Request– Sent to home agent– New IP address– Flags to indicate whether broadcast traffic

should be delivered– Security information to prevent remote

redirects/replay attacks (more soon)Registration Reply

– ACK or an error

Page 93: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

93

Mobile IP: Care-of AddressesMobile IP: Care-of Addresses

Whenever a mobile host connects to a remote network, two choices:– care-of can be the address of a foreign agent on

the remote network• foreign agent delivers packets forwarded from home

agent to mobile host– care-of can be a temporary, foreign IP address

obtained through, e.g., DHCP• home agent tunnels packets directly to the

temporary IP address

Regardless, care-of address must be registered with home agent

Page 94: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

94

At the Other End...At the Other End...

Depending on type of care-of address:– Foreign agent’s IP or– Mobile host’s IP (obtained via DHCP)

… someone strips outer IP header of tunneled packet, which is then fed to the mobile host

Decapsulation can be performed by agent or mobile host

Aside: Any thoughts on advantages of foreign agent vs. co-located (using foreign agent’s IP) address?

Which has less overhead for mobile host? Which consumes fewer IP addresses (still a concern

with IPv4)?

Page 95: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

95

Routing InefficiencyRouting Inefficiency

home agentcorrespondent host

Mobile host and correspondent hostmight even be on the samenetwork!!

Page 96: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

96

Route OptimizationsRoute Optimizations Possible Solution:

– Home agent sends current care-of address to correspondent host

– Correspondent host caches care-of address– Future packets tunneled directly to care-of

address– Problems when mobile host moves…– Care of address becomes stale, needs to be

updated– Requires that correspondent hosts understand

Mobile-IP– Requires security relationship between

correspondent hosts and home agent of roaming mobile host

Page 97: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

97

The Devil is in the Details...The Devil is in the Details...

How does the mobile host get a remote IP?– Router advertisements, DHCP, manual...– Agent advertisement if remote network is

Mobile-IP enabled How can a mobile host tell where it is?

– Am I at home?– Am I visiting a foreign network?– Have I moved?– One way: by listening for advertisements from

its home agents– Presence indicates home– Absence tends to indicate not home…

Page 98: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

98

Devil (2)Devil (2)

Redundancy: What if the home agent doesn't answer a registration request? Or is dead?– Registration request to broadcast address of home network– All available home agents will hear and reply, but will reject

service because message received via broadcast– Error in Registration Reply (a rejection) carries new home

agent ID– Now can request help from a specific new home agent

"Ingress" filtering– Routers which see packets coming from a direction from

which they would not have routed the source address are dropped

Page 99: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

99

Packets Dropped: "Ingress" FilteringPackets Dropped: "Ingress" Filtering

home agentcorrespondent host

Correspondent, home agent onsame network. Packet from mobile host is deemed "topologically incorrect“

Page 100: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

100

Another Devil: Security IssuesAnother Devil: Security Issues

We'll look at one of several security issues: Bogus registration (denial of service)

attacks– Malicious host sends fake registration

messages to home agent "on behalf" of the mobile host

– Packets could be forwarded to malicious host or to the bit bucket

Page 101: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

101

Bogus Registration AttackBogus Registration Attack

home agent

Hehehehe!!

Send packets to me!!????

registration requestMadame Evil

Page 102: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

102

AuthenticationAuthentication

To fix this problem, authenticate registration attempts

Use keyed message hashing to generate a message digest – MD5: see RFC 1321

Home agent generates hash using shared private key to message to see if message digest is identical

Page 103: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

103

Authentication (2)Authentication (2)

home agent

digest

… care-of address…private key

???

Page 104: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

104

Ooops. Replay Attacks!Ooops. Replay Attacks!

home agent

digest

"…mooohahahahahahahaha!!!!!"

captured registration is retransmitted

Page 105: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

105

Avoiding Replay AttacksAvoiding Replay Attacks

Avoid replay attacks by making registration requests unique

Add time or a pseudo-random number to registration request/reply

If time or random number is out of sync, provide info to resync in rejection

Insufficient information to help malicious host Counter instead of time/random number not as

good Would allow storing a ‘set’ of registration requests

Page 106: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

106

Random Number Avoids ReplayRandom Number Avoids Replay

home agent

digest

… care-of address +random number...

private key

???

Page 107: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

107

Deployment ScenariosDeployment Scenarios

Page 108: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

108

Another Devil: ARPAnother Devil: ARP

Address Resolution Protocol Allows hosts to broadcast an IP address and

retrieve the MAC address of the host Home agent must perform “proxy ARP” for

registered mobile hosts that are away Home agent must perform “gratuitous ARPs”

when mobile host leaves home network to update ARP caches of local hosts

Mobile agent, on returning home, must issue gratuitous ARPs for the same reason

Page 109: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

109

Mobile IP: Conclusions...Mobile IP: Conclusions...

Great potential for mobile application deployment using Mobile IP

Minimizes impact on existing Internet infrastructure

Security issues are important (Complicated) firewall solutions proposed Several working implementations (e.g.,

Monarch project at CMU) Some things still need work: e.g., integration

of Mobile IP and 802.11 wireless LANs

Page 110: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

110The Most Popular Transport Protocol: TCPThe Most Popular Transport Protocol: TCP

TCP (Transmission Control Protocol)– Connection-oriented– Byte stream-oriented– Slower setup– Consumes file handles: one per connection– Flow control, automatic retransmission

• No packet reordering (delivery is FIFO)• No packet loss• No duplication

– Theoretically “no” limit on size of objects that can be dumped into a TCP stream

– In practice, limits exist

Page 111: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

111

Worried? Networking BackgroundWorried? Networking Background

References:– RFC 793 (TCP)– Network programming

• Internetworking with TCP/IP by Comer• Unix Network Programming by Stevens

– Protocol details• Computer Networks: A Systems Approach by

Peterson and Davie• IBM redbook on TCP/IP (free, online)

(publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstracts/gg243376.html?Open)

Page 112: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

112

More Background on TCPMore Background on TCP

TCP developed for wired, low latency networks Full-duplex, reliable, byte-oriented (stream) protocol Highly optimized Adaptive retransmission to deal with varying round trip times

(RTTs), but max of 60 secs Flow control and congestion control

– Flow control: Don’t overwhelm receiver– Congestion control: Don’t overwhelm network

Sliding Window Protocol…– Window sizes are variable– Resources dedicated to a connection can vary on either side

of the connection– Must negotiate to determine resources allocated– Don’t want to retransmit packets that are still in transit!

Page 113: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

113

TCP Header FormatTCP Header Format

Source port/IP + Destination port/IP unique define TCP connection Sequence number is for first byte of data carried in this segment Flags: (S)YN, (F)IN, (R)ESET, (P)USH, (A)CK, (U)RGENT PUSH == transfer w/o waiting for buffer fill (e.g., for telnet) URGENT == allow sending urgent data “out of band” RESET == “abort connection immediately” Window is size of sliding window at sender of packet Checksum provides error checking for the packet

Page 114: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

114

TCP Connection EstablishmentTCP Connection Establishment

SYN (“synchronize”) indicates connection establishment

Initial sequence number is larger than previous sequence numbers to prevent data from old connections to the same host/port from being accepted

Poor choice for initial seq # allows nasty attacks

Final ACK establishes connection

For connection teardown, a FIN is transmitted by one side and this is ACKed by the other side

Page 115: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

115

Sliding Window ProtocolsSliding Window Protocols

Sliding Window Protocols are typically used to provide connection-oriented communication; they naturally provide:– Flow control– Retransmission capability– Buffering for out-of-order packets

Receive Window @ the receiverSend Window @ the sender

Page 116: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

116

Sliding Window: SenderSliding Window: Sender

Every packet has an associated sequence number (corresponding to first byte of data in TCP)

Send window: packets which have been transmitted but no ACK has been received; unacknowledged packets must be buffered

3

4

5

2

tap..tap..tap..

tap..tap..tap..

tap..tap..tap..

6

ACK

Page 117: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

117

Sliding Window: ReceiverSliding Window: Receiver

Receive window: packets receiver is willing to receive; when the lowest numbered packet is received, then becomes willing to accept next packet in the sequence

3

Msg # 4

5

2

tap..tap..tap..

tap..tap..tap..

6

Msg # 2

tap...

Page 118: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

118

SlidingSliding Window: Thoughts Window: Thoughts

Flow control is guaranteed Messages corrupted in transit are always available

at the sender for retransmission Lost packets are retransmitted Out of order messages are handled correctly In TCP, windows change size—our simplified view

didn’t show this Each ACK includes a window size advertisement,

indicating how much data the sender can currently buffer

Page 119: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

119

SENDWINDOW

RECEIVEWINDOW

Receiver’s advertised

window size

Determine receiver’s window size, adjust & send

SENDER RECEIVER

Naïve TCPNaïve TCP

This allows flow control: Don’t overwhelm the receiver

Page 120: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

120

SEND WINDOW

RECEIVEWINDOW

Even after adjusting for receiver, data can still overwhelm intervening

routers...packets dropped!

SENDER RECEIVER

Router

The Problem?The Problem?

Page 121: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

122

SENDWINDOW

RECEIVEWINDOW

Start by sending just one segment, every time you get an

ACK, increase cwnd by one segment

SENDER RECEIVER

packet

Router

Slow StartSlow Start

Results in exponential increase, despite the name...

ACK

cwnd is initially 1 segment

Page 122: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

123Slow Start == Exponential IncreaseSlow Start == Exponential Increase

SENDER

RECEIVER

1

2

4

ACK

Page 123: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

124

SEND WINDOW

RECEIVEWINDOW

Send window cwnd doubles during each RTT until packets are lost or a

threshold ssthresh is hit.

SENDER RECEIVER

pa.c..ket

Router

The End of Slow Start...The End of Slow Start...

ssthresh is initially 64K

Page 124: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

125

Congestion AvoidanceCongestion Avoidance

When slow start is terminated because cwnd exceeds ssthresh, increase cwnd by a smaller amount on each ACK

Congestion avoidance phase increases send window more slowly than slow start

When a packet is lost, TCP assumes it is caused by network congestion (!)…

Then set ssthresh to cwnd / 2, set cwnd to 1, restart slow start

Page 125: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

126

Fast RecoveryFast Recovery

Two ways to detect (possible) packet loss:– (1) Timeout

• Result: restart slow start– (2) Duplicate ACKS

• Data must still be flowing, because out-of-order packets are being received…

• Receiver sends duplicate of last in-order ACK

Fast recovery enters congestion avoidance without re-starting slow start for case (2)

Attempt to keep the pipe full under moderate congestion

Page 126: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

127

SENDWINDOW

RECEIVEWINDOW

If the receiver got packets 1,2,4,5,6,7,8,9, what does it do to get

the missing packet 3?

SENDER RECEIVER

ACKS

packet

Router

What About Lost Packets?What About Lost Packets?

Page 127: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

128

SENDWINDOW

RECEIVEWINDOW

A round trip timer is kept, so sender will eventually resend. But

we know what’s missing...

SENDER RECEIVER

ACKS

packets

Router

Lost/Reordered Packets...Lost/Reordered Packets...

Page 128: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

129

SEND WINDOW

RECEIVE WINDOW

Send another ACK for highest in-order packet when out-of-

order received...

SENDER RECEIVER

Router

THREE duplicate ACKs received will result in retransmission— three to avoid possibility of just out-of-order packets

Fast RetransmitFast Retransmit

ACK, ACK, ACK!!!

Page 129: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

130

Wireless: What Breaks?Wireless: What Breaks?

Packet loss in wired networks very low, so assumption that – packet loss == network congestion is valid

Not necessarily valid in wireless networks, where error rates are higher– packet loss can occur when the network is only lightly

loaded– resetting size of cwnd on packet loss seriously affects

throughput– Think: tree…tree…tree….tree…tree…tree…– high latency makes this worse--even more time to ramp

up (because cwnd size changes only on an ACK)!

Page 130: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

131

What Breaks (2)What Breaks (2)

High latency (e.g., space-bound hosts) and handoffs can cause timers to expire

Poor use of available bandwidth when periodic loss of service causes slow start to be reinitiated

Asymmetric links can overwhelm the return path, even when it's mostly carrying ACKs– (e.g., for satellite connections)

Page 131: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

132

What Breaks (3)What Breaks (3)

Problems with header compression techniques Idea: Header compression allows sending only

changes in, e.g., a TCP header Less overhead than transmitting full header Problems with wireless, tho:

– Error rates higher—more likely to lose packets– Lost packet means differential header info in subsequent

packets is unusable…– This causes many packets to be discarded, requires

resynchronization of sender/receiver– Reduces the usefulness of header compression– Some recent work on fixing this problem

Page 132: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

133

What Breaks (4)What Breaks (4)

Might want TCP connections to remain open even if a host is mobile

Roaming out of range of the wireless network to take a water sample

“Be back later” functionality

Page 133: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

134

Hacking TCP for WirelessHacking TCP for Wireless

Major concerns:– Changes must be largely compatible with

deployed TCP implementations– Infeasible to insist on changes to millions of

installed TCP suites– (We saw these restrictions when considering

Mobile IP)– Means:

• Proxies on the base stations serving mobile hosts • Changes on the mobile end• Negotiable changes (use TCP options)

Page 134: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

135

Hacking, Cont.Hacking, Cont.

Can higher error rates be hidden from TCP? Would allow assumption …

packet loss == network congestion

… to remain unchanged in TCP/IP stack– Problem: TCP timers may go off, causing spurious

retransmission…– 60 second rule

Now some formal solutions

Page 135: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

136

Ramon Caceres paperRamon Caceres paper

“Improving the Performance of Reliable Transport Protocols in Mobile Computing Environments”

See: http://www.cs.uno.edu/~golden/6990MC/MobilePapers/ramon1.ps

Measure performance of TCP in presence of handoffs

2Mb/sec 802.11 Mobile-IP environment from Columbia 4.3BSD Tahoe (fast retransmit, exponential

retransmit backoff) 10Mb/sec wired network

Page 136: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

137

Caceres: TestbedCaceres: Testbed

Initiate TCP connections between MH (mobile host)and SH (stationary host)

MH moves between cells

In experiments, mobility is actually handled in software—the MH can really see both base stations, but software forces the MH to “forget” that it can see one base and handoff to another

Much easier to setup, as you can imagine…

Doesn’t require experimentersto physically move equipment

Page 137: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

138

ScenariosScenarios

NO HANDOFF– Mobile unit stays in one place– Base case

OVERLAPPING CELLS– Mobile unit moves between access points, but remains in contact

with “old” base station until relationship with “new” is established NON-OVERLAPPING, 0-second RENDEZVOUS DELAY

– Mobile unit loses contact with “old” base station during movement, but does not need to wait for beacon from “new” base station

– Base case for non-overlapping coverage NON-OVERLAPPING, 1-second RENDEZVOUS DELAY

– Mobile unit loses contact with old base station during movement and must wait 1 second for a beacon before establishing connection with new base station

– Base case for scattered coverage

Page 138: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

139

Initial ObservationsInitial Observations

Page 139: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

140

Seq #sSeq #s

(1 second rendezvous delay case)

Connection frozen for 3 seconds!

Page 140: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

141

Congestion WindowCongestion Window

Non-overlapping cells with 1sec rendezvous delay, movementevery 8sec

Dips are a result of the slow-start algorithm being triggeredDelays == BAD for interactive users!

Page 141: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

142

Idea: Force Fast RetransmitIdea: Force Fast Retransmit

Hack network stack to force fast retransmission immediately after handoff is complete. Makes connection resume operation almost 0.6sec faster!!

Page 142: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

143

More Dramatic w/ 1sec DelayMore Dramatic w/ 1sec Delay

Exponential backoff of retransmission timer can be a killer. Forcing fast retransmit really helps for longer handoff delay.

Page 143: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

144

Delay Drops, TooDelay Drops, Too

Page 144: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

145

Throughput Improves…Throughput Improves…

Page 145: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

146

ThoughtsThoughts

TCP is a jumble of elegant hacks to improve performance

Caceres paper illustrates that other very simple, elegant hacks may offer help for wireless

Major problem is wide deployment of older TCP/IP stacks that can’t be hacked

Page 146: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

147

READING ROADMAPREADING ROADMAP

Adaptation: Chapters 1 and 6More location management: Chapter 2Data dissemination: Chapter 3Context-aware computing: Chapter 4Mobile agents: Chapter 6Service discovery: Chapter 7

Page 147: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

AdaptationAdaptation

Page 148: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

149

AdaptationAdaptation

Mobile applications must adapt to changing resource levels to provide an acceptable computing experience to users

Can:– Adapt functionality– Adapt data

Page 149: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

150

Functional AdaptationFunctional Adaptation

Change the way the application operates as resources change

Use cached copies of data instead of making remote procedure calls against a server

Render low resolution images rather than relying on an (unreachable) rendering farm

Page 150: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

151

Data AdaptationData Adaptation

Change the quality or timeliness of data streams

Higher or lower resolution videoChange bitrate of streaming audioUse out-of-date temperature or stock

market data rather than current values when disconnected

Page 151: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

152

AdaptationAdaptation

application entirely responsible for reacting

(or not) to changing conditions

system entirelyresponsible for reacting

(or not) to changing conditions; “protects” application

level of application adaptability

none

full

Odyssey is one point on this spectrum

Page 152: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

153

Application-Aware AdaptationApplication-Aware Adaptation

In most cases, adaptation is application-specific

e.g., if network bandwidth becomes scarce, need to do different things for applications dealing with…– Video– Audio– Still images– Stock quotes– individual applications (data type etc.)

Page 153: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

154

Application-Aware (2)Application-Aware (2)

Applications are in better position to perform needed adaptations

In client/server scenarios, may need to adapt at both the client and server ends

Possible approaches:– Purely internal to application– Layer under application– Using special OS features and/or libraries– Use application-specific (but general purpose?) proxies– Web browsers can use last approach– Can have any sort of “adaptation” as long as an

appropriate proxy exists

Page 154: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

155

"Agile Application-Aware …""Agile Application-Aware …"

Paper:– "Agile Application-Aware Adaptation for

Mobility" See:

http://www.cs.uno.edu/~golden/6990MC/MobilePapers/satya3.ps

Describes the Odyssey system Prototype that allows mobile applications to

adapt to changing conditions– Network bandwidth– Battery / CPU power, etc.

Page 155: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

156

"Fidelity""Fidelity"

Mobile clients may access a number of data stores– Databases– WWW– Files

Ideally, want data accessed by mobile host to be identical to "reference" copy

Might be unrealistic Fidelity measures degree to which copies

match

Page 156: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

157

"Fidelity" (2)"Fidelity" (2)

Odyssey provides a framework for developing diverse fidelity guarantees

Largely depends on type of data– Video

• Color depth, resolution, frames per second

– Audio• # of bits per sample, encoding scheme

– Web data • Age: latest copy of page vs. a slightly older one

Generally, must also depend on application Different applications may choose different

tradeoffs

Page 157: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

158

"Concurrency""Concurrency"

Palm pilots typically execute only one application at a time

Likely that users of more powerful mobile computers (IPAQs, laptops) will want to run multiple applications

Background monitoring applications Means OS must manage network resources,

battery power, cache space, … “All resources are not just for you!”

Page 158: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

159

"Agility""Agility"

System should react quickly and accurately to changes in availability of resources

Changes may result because of a physical reason– Battery is draining– Network access is curtailed because of

interference

…or because of increased application demands– Additional applications are now running…

Page 159: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

160

Odyssey: GoalsOdyssey: Goals

Allow application-aware adaptation– Each application will decide how to adapt to changing

conditions– Can register its interest in various resource levels– System informs applications when resource levels deviate

from certain tolerances Support application diversity and concurrency

– Applications decide how resource level map to fidelity levels– Odyssey controls resource monitoring

Application can either adapt functionality or data quality

Odyssey examples concentrate on data adaptation

Page 160: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

161

Application Aware AdaptationApplication Aware Adaptation

Wardens support type-awareness Supporting a new type involves writing a

warden Viceroy is responsible for centralized

resource management

video warden

battery wardenvice

roy

application

Page 161: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

162

Application Aware Adaptation (2)Application Aware Adaptation (2)

Applications access resources through Odyssey… All data to and from server flows through Odyssey Wardens communicate with data servers, handle

caching Applications never contact wardens directly request() system call allows applications to express

windows of tolerance Viceroy uses an upcall [callback] to notify application

that resource level has strayed Application then adjust expectations, does another

request()

Page 162: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

163

Adaptation ExampleAdaptation Example

Video application requests enough bandwidth to receive high resolution,15fps in color

Odyssey says “Umm, no.” Application drops requirements to low resolution,

10fps in black and white– Specifies both min and max bandwidth

Scenario # 1:– Bandwidth drops– Odyssey informs application that bandwidth has fallen

below specified limit– Application makes another request (e.g., 3fps or still

images) or decides video isn’t feasible and informs the user

Page 163: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

164

Adaptation Example (2)Adaptation Example (2)

Scenario # 2:– Bandwidth increases substantially

– Odyssey informs application that bandwidth has risen above upper limit

– Application makes another attempt 15fps color

Page 164: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

165

Odyssey Architecture (from paper)Odyssey Architecture (from paper)

Page 165: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

166

"Fidelity""Fidelity"

Mobile clients may access a number of data stores– Databases– WWW– Files

Ideally, want data accessed by mobile host to be identical to "reference" copy

Might be unrealistic Fidelity measures degree to which copies

match

Page 166: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

167

SampleSample Applications (1) Applications (1)

Video Player: Xanim– For evaluation, split into client/server– Store three formats at server: high quality, low

quality, black and white– Not too much magic: application calculates

bandwidth requirement– Registers requirement,

asks for a change informat if bandwidthchanges

Page 167: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

168

Sample Applications (2)Sample Applications (2)

Netscape– More challenging, source code is not available– Solution uses Netscape proxy facility– Proxy interfaces with Odyssey and selects fidelity– Web warden chooses image quality– Multiple image formats stored on a server

Handles different image

formats

Page 168: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

169

Odyssey: EvaluationOdyssey: Evaluation

Experiments help determine:– How agile is Odyssey in the face of

changing network bandwidth?– How beneficial is it for (some) applications

to exploit the adaptation that Odyssey offers?

Bandwidth is controlled by modifying network stack

Page 169: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

170

"Waveforms""Waveforms"

Increase in bandwidth Decrease in bandwidth

Brief, sharp increase in bandwidth Brief, sharp decrease in bandwidth

Page 170: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

171

Agility Measurements (1)Agility Measurements (1)

Page 171: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

172

Agility Measurements (2)Agility Measurements (2)

Page 172: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

173

Agility Measurements (3)Agility Measurements (3)

Page 173: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

174

Agility Measurements (4)Agility Measurements (4)

Page 174: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

175

Evaluation of Adaptation (1)Evaluation of Adaptation (1)

How much does it help? Table below summarizes for video player Bandwidth is always sufficient for B/W frames Interested in lowest drop rates @ highest fidelity

(Numbers in parentheses are standard deviations)

static strategies

Page 175: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

176

Evaluation of Adaptation (2)Evaluation of Adaptation (2)

Table below summarizes for web browser Experiment repeatedly retrieves the same image until time

is up Interested in best fidelity within twice Ethernet's load time

(Numbers in parentheses are standard deviations)

fooled

static strategies

Page 176: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

177

More on AdaptationMore on Adaptation

Odyssey allows applications to register interest in resource levels and adapt accordingly

For multitasking operating systems, need more…

When multiple applications compete for resources:– Need prioritization of applications– Prioritization will likely require interaction w/ user– Middleware might “learn” what’s important?– Adaptation interface should allow applications to

know about existence of other competing applications

Page 177: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

178

Final Word on AdaptationFinal Word on Adaptation

Although proxies can be used, Odyssey really aimed at systems for which source code is available

Other systems geared toward applications which can’t easily be modified

e.g., Puppeteer targets applications which provide a data manipulation API

(That is, some way to “feed” data to an application programmatically)

Page 178: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

179

Final Picture on AdaptationFinal Picture on Adaptation

Page 179: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Location ManagementLocation Management

Page 180: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

181

Location Management (Ch2)Location Management (Ch2)

Fundamental ideas: Mobile hosts (MH) are served by base stations (BS) (also

called access points (AP) Mobile hosts can roam about the network Mobile hosts (or other parties) must locate mobile hosts to

communicate with them– Involves finding the base station currently serving the

mobile host– Search operation

When a mobile host moves, must let the system know where it is– Update operation (also called registration)

Must allow mobile hosts to switch between base stations to support roaming– Handoff operation

Page 181: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

182

Location InformationLocation Information

MH will be served by one BS at a time BS coverage is one cell Location information can be maintained at

various granularities– One cell—requires MH to update location every

time it moves from one cell to another• Tradeoff: more accurate location info vs. a large number

of updates, which may overwhelm the system

– Cell group—organize cells into groups, only update when leaving current group

• Tradeoff: less accurate location info, which will require paging every BS in the group, fewer updates, so less load on the system

Page 182: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

183

TradeoffsTradeoffs

There will be always be tradeoffs between cost of search and update operations

More updates == more accurate location info == less cost for search

Fewer updates == less accurate location info == more cost for search

Page 183: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

184

HandoffHandoff

Handoffs between BSs are required to support roaming

There isn’t necessarily a one-to-one correspondence between handoffs and updates

Issues:– When to handoff?– Selecting a new BS– Allocation of resources such as channels– Informing old BS so that packets destined for MH

can be forwarded

Page 184: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

185

Handoff (2)Handoff (2)

Mobile controlled handoff vs. Network controlled handoff

Handoff may be necessary because:– Mobile host is moving– Current BS is overloaded– Quality of communication with current BS

is poor

Page 185: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

186

Handoff (3)Handoff (3)

Choosing a new BS:– Based on signal strength– Base on predicted movement of MH– Based on resources available at BS

Page 186: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

187

Location RegistrarsLocation Registrars

Location Registrars (LR) are databases containing location information for MHs

Can be one or manyTo get the idea, consider a system with

only one LR, a Home Location Registrar

Location is maintained at single-cell granularity

Page 187: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

188Single LR Scheme: Switching ONSingle LR Scheme: Switching ON

Page 188: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

189

Single LR Scheme: HandoffSingle LR Scheme: Handoff

Page 189: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

190

Single LR Scheme: SearchSingle LR Scheme: Search

Page 190: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

191

Single LR Scheme: Search FailureSingle LR Scheme: Search Failure

Page 191: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

192Enhancements to Single LR SchemeEnhancements to Single LR Scheme

Can add a timestamp and time-to-live to registration information

If time-to-live expires, then location for mobile host is assumed out of date

Can expand the search to neighboring cells when attempting to locate a MH

Page 192: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

193Registration Area-Based Registration Area-Based Location ManagementLocation Management

Registration area == a group of cells; update only when crossing a registrationarea boundary

Page 193: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

194

Other OptimizationsOther Optimizations

Movement-based update– Update location when MH crosses a specified

number of cell boundaries Distance-based update

– Update location when MH moves a specified distance away from the last point of update

Forwarding pointers– When maintaining multiple location registrars, use

a chain of forward pointers to track the MH Replication of location registrars

– Flat– Hierarchical

Page 194: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

195

Flat ReplicationFlat Replication

Page 195: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

196

Hierarchical ReplicationHierarchical Replication

Non-leaf nodes cache all info in attached subtrees

Page 196: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Data Dissemination Data Dissemination

Page 197: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

198

Communications AsymmetryCommunications Asymmetry

Network asymmetry– In many cases, downlink bandwidth far exceeds

uplink bandwidth

Client-to-server ratio– Large client population, few servers

Data volume– Small requests for info, large responses– Again, downlink bandwidth more important

Update-oriented communication– Updates likely affect a number of clients

Page 198: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

199Disseminating Data to Wireless HostsDisseminating Data to Wireless Hosts

Broadcast-oriented dissemination makes sense for many applications

Can be one-way or with feedback– Sports– Stock prices– New software releases (e.g., Netscape)– Chess matches– Music– Election Coverage– Weather…

Page 199: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

200

Dissemination: PullDissemination: Pull

Pull-oriented dissemination can run into trouble when demand is extremely high– Web servers crash– Bandwidth is exhausted

client

client

client

clientclient

client

client

server

help

Page 200: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

201

Dissemination: PushDissemination: Push

Server pushes data to clients No need to ask for data Ideal for broadcast-based media (wireless)

client

client

client

clientclient

client

client

server

Whew!

Page 201: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

202

Broadcast DisksBroadcast Disks

1

2 3

4

5 6

server

Schedule of data blocks to be transmitted

Page 202: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

203

Broadcast Disks: SchedulingBroadcast Disks: Scheduling

1

2 3

4

5 6

Round Robin Schedule

1

1 2

1

3 1

Priority Schedule

Page 203: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

204

Priority Scheduling (2)Priority Scheduling (2)

Random– Randomize broadcast schedule– Broadcast "hotter" items more frequently

Periodic– Create a schedule that broadcasts hotter items more

frequently…– …but schedule is fixed– "Broadcast Disks: Data Management…" paper uses

this approach– Simplifying assumptions

• Data is read-only• Schedule is computed and doesn't change…• Means access patterns are assumed the same

Allows mobile hosts to sleep…

Page 204: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

205"Broadcast Disks: Data Management…""Broadcast Disks: Data Management…"

Order pages from "hottest" to coldest Partition into ranges ("disks")—pages in a range

have similar access probabilities Choose broadcast frequency for each "disk" Split each disk into "chunks"

– maxchunks = LCM(relative frequencies)– numchunks(J) = maxchunks / relativefreq(J)

Broadcast program is then:for I = 0 to maxchunks - 1

for J = 1 to numdisks

Broadcast( C(J, I mod numchunks(J) )

Page 205: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

206

Sample Schedule, From PaperSample Schedule, From Paper

Relative frequencies 4 2 1

Page 206: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

207Broadcast Disks: Research QuestionsBroadcast Disks: Research Questions

From Vaidya:– How to determine the demand for various

information items?– Given demand information, how to

schedule broadcast?– What happens if there are transmission

errors?– How should clients cache information?

• User might want data item immediately after transmission…

Page 207: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

208

Hot For You Ain't Hot for MeHot For You Ain't Hot for Me

Hottest data items are not necessarily the ones most frequently accessed by a particular client

Access patterns may have changed Higher priority may be given to other clients Might be the only client that considers this data

important… Thus: need to consider not only probability of

access (standard caching), but also broadcast frequency

A bug in the soup: Hot items are more likely to be cached! (Reduce their frequency?)

Page 208: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

209

Broadcast Disks Paper: CachingBroadcast Disks Paper: Caching

Under traditional caching schemes, usually want to cache "hottest" data

What to cache with broadcast disks? Hottest? Probably not—that data will come around

soon! Coldest? Ummmm…not necessarily… Cache data with access probability

significantly higher than broadcast frequency

Page 209: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

210

Caching, Cont.Caching, Cont.

PIX algorithm (Acharya) Eject the page from local cache with the

smallest value of:

probability of access broadcast frequency

Means that pages that are more frequently accessed may be ejected if they are expected to be broadcast frequently…

Page 210: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

211

Broadcast Disks: IssuesBroadcast Disks: Issues

User profiles– Provide information about data needs of particular

clients– "Back channel" for clients to inform server of needs– Either advise server of data needs…– …or provide "relevance feedback"

Dynamic broadcast– Changing data values introduces interesting

consistency issues– If processes read values at different times, are the

values the same?– Simply guarantee that data items within a particular

broadcast period are identical?

Page 211: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

212

Hybrid Push/PullHybrid Push/Pull

"Balancing Push and Pull for Data Broadcast" (Acharya, et al SIGMOD '97)

"Pull Bandwidth" (PullBW) – portion of bandwidth dedicated to pull-oriented requests from clients

PullBW = 0%"pure" Push

Clients needinga page simply wait

PullBW = 100%Schedule is totally request-based

Page 212: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

213

Interleaved Push and Pull (IPP)Interleaved Push and Pull (IPP)

Mixes push and pull Allows client to send requests to the server for

missed (or absent) data items Broadcast disk transmits program plus requested

data items (interleaved) Fixed threshold ThresPerc to limit use of the

back channel by a particular client Sends a pull request for p only if # of slots before

p will be broadcast is greater than ThresPerc ThresPerc is a percentage of the cycle length Also controls server load–as ThresPerc 100%,

server is protected

Page 213: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

214

CSIM-based SimulationCSIM-based Simulation

Measured Client (MC)– Client whose performance is being measured

Virtual Client (VC)– Models the "rest" of the clients as a single entity… – …chewing up bandwidth, making requests…

Assumptions:– Front channel and back channel are independent– Broadcast program is static—no dynamic profiles– Data is read only

Page 214: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

215

Simulation (1)Simulation (1)

No feedback to clients!

Page 215: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

216

Simulation (2)Simulation (2)

Can control ratio of VC to MC requests Noise controls the similarity of the access

patterns of VC and MC Noise == 0 same access pattern PIX algorithm is used to manage client cache VC's access pattern is used to generate the

broadcast (since VC represents a large population of clients)

Goal of simulation is to measure tradeoffs between push and pull under broadcast

Page 216: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

217

Simulation (3)Simulation (3)

CacheSize pages are maintained in a local cache

SteadyStatePerc models the # of clients in the VC population that have “filled” caches—e.g., most important pages are in cache

ThinkTimeRatio models intensity of VC request generation relative to MC

ThinkTimeRatio high means more activity on the part of virtual clients

Page 217: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

218

Simulation (4)Simulation (4)

Page 218: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

219

Experiment 1: Push vs. PullExperiment 1: Push vs. Pull

Important! PullBW set at 50% in 3a – if server's pull queue fills, requests are dropped!

At PullBW = 10%, reduction in bandwidth hurts push, is insufficient for pull requests!

server death!

Light loads: pull better

Page 219: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

220Experiment 2: Cache Warmup Time for MCExperiment 2: Cache Warmup Time for MC

Low server load: pull better. High server load: push better.

Page 220: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

221Experiment 3: Noise: Are you (VC) like Experiment 3: Noise: Are you (VC) like me (MC)?me (MC)?

On the left, pure push vs. pure pull. On the right, pure push vs. IPP

!!!

Page 221: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

222

Experiment 4: Limiting GreedExperiment 4: Limiting Greed

If there’s plenty of bandwidth, limiting greed isn’t a good idea

On the other hand…

Page 222: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

223Experiment 5: Incomplete BroadcastsExperiment 5: Incomplete Broadcasts

Not all pages broadcast—non-broadcast pages must be explicitly pulledLesson: Must provide adequate bandwidth or response time will suffer!

In 7b, making clients wait longer before requesting helps…

Server overwhelmed—requests are being dropped!

Page 223: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

224

Incomplete Broadcast: MoreIncomplete Broadcast: More

Lesson: Careful! At high server loads with lots of pages not broadcast, IPP can be worse than push or pull!

Page 224: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

225

Experimental ConclusionsExperimental Conclusions

Light server load: pull better Push provides a safety cushion in case a pull request is

dropped, but only if all pages are broadcast Limits on pull provide a safety cushion that prevents the

server from being crushed Broadcasting all pages can be wasteful But must provide adequate bandwidth to pull omitted

pages… Otherwise, at high load, IPP can be worse than pull! Overall: Push and pull tend to beat IPP in certain

circumstances But IPP tends to have reasonable performance over a wide

variety of system loads… Punchline: IPP a good compromise in a wide range of

circumstances

Page 225: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

226

Mobile Caching: General IssuesMobile Caching: General Issues

Mobile user/application issues:– Data access pattern (reads? writes?)– Data update rate– Communication/access cost– Mobility pattern of the client– Connectivity characteristics

• disconnection frequency• available bandwidth

– Data freshness requirements of the user– Context dependence of the information

Page 226: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

227

Mobile Caching (2)Mobile Caching (2)

Research questions:– How can client-side latency be reduced?– How can consistency be maintained among all caches and

the server(s)?– How can we ensure high data availability in the presence of

frequent disconnections?– How can we achieve high energy/bandwidth efficiency?– How to determine the cost of a cache miss and how to

incorporate this cost in the cache management scheme?– How to manage location-dependent data in the cache?– How to enable cooperation between multiple peer caches?

Page 227: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

228

Mobile Caching (3)Mobile Caching (3)

Cache organization issues:– Where do we cache? (client? proxy? service?)– How many levels of caching do we use (in the case of

hierarchical caching architectures)?– What do we cache (i.e., when do we cache a data item and

for how long)?– How do we invalidate cached items?– Who is responsible for invalidations? – What is the granularity at which the invalidation is done?– What data currency guarantees can the system provide to

users?– What are the (real $$$) costs involved? How do we charge

users?– What is the effect on query delay (response time) and

system throughput (query completion rate)?

Page 228: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

229

Weak vs. Strong ConsistencyWeak vs. Strong Consistency

Strong consistency– Value read is most current value in system– Invalidation on each write can expire outdated values– Disconnections may cause loss of invalidation messages– Can also poll on every access– Impossible to poll if disconnected!

Weak consistency– Value read may be “somewhat” out of date– TTL (time to live) associated with each value

Can combine TTL with polling e.g., Background polling to update TTL or retrieval of

new copy of data item if out of date

Page 229: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

230

Disconnected OperationDisconnected Operation

Disconnected operation is very desirable for mobile units

Idea: Attempt to cache/hoard data so that when disconnections occur, work (or play) can continue

Major issues:– What data items (files) do we hoard?– When and how often do we perform hoarding?– How do we deal with cache misses?– How do we reconcile the cached version of the

data item with the version at the server?

Page 230: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

231

One Slide Case Study: CodaOne Slide Case Study: Coda

Coda: file system developed at CMU that supports disconnected operation

Cache/hoard files and resolve needed updates upon reconnection

Replicate servers to improve availability What data items (files) do we hoard?

– User selects and prioritizes– Hoard walking ensures that cache contains the

“most important” stuff When and how often do we perform

hoarding?– Often, when connected

Page 231: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

232

Coda (2)Coda (2)

(OK, two slides) How do we deal with cache misses?

– If disconnected, cannot How do we reconcile the cached version of the data

item with the version at the server? – When connection is possible, can check before updating– When disconnected, use local copies– Upon reconnection, resolve updates– If there are hard conflicts, user must intervene (e.g., it’s

manual—requires a human brain) Coda reduces the cost of checking items for

consistency by grouping them into volumes If a file within one of these groups is modified, then

the volume is marked modified and individual files within can be checked

Page 232: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

233

WebExpressWebExpress

Housel, B. C., Samaras, G., and Lindquist, D. B., “WebExpress: A Client/Intercept Based System for Optimizing Web Browsing in a Wireless Environment,” Mobile Networks and Applications 3:419–431, 1998.

System which intercepts web browsing, providing sophisticated caching and bandwidth saving optimizations for web activity in mobile environments

Major issues:– Disconnected operation– Verbosity of HTTP protocol Perform Protocol Reduction– TCP connection setup time Try to re-use TCP connections– Low bandwidth in wireless networks Caching– Many responses from web servers are very similar to those seen

previously Use differencing rather than returning complete responses, particularly for CGI-based interactions

Page 233: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

Slides © Prof. Golden G. Richard III, Department of Computer Science, University of New Orleans, 2004

234

WebExpress (2)WebExpress (2)

Two intercepts: both on client side and in the wired network

Caching on both client and on wired network + differencing

One TCP connection

Reduce redundantHTTP header info

Reinsert removed HTTP header info on server side

Page 234: CSCI 6361: Topics in Mobile Computing Dept. of Computer Science University of New Orleans Fall 2004 Dr. Golden G. Richard III.

END OF SET # 1END OF SET # 1

MIDTERM REVIEW Oct 14

MIDTERM EXAM Oct 19