You are on page 1of 35

TCSS 558: Applied Distributed Systems

Architecture and Networking

Todays agenda
Distributed Systems vs. Non-Distributed
Systems
Examples of each
Networking background
High-level of basics. This is a rich field

Flynns Taxonomy (1966)


Classification of Architectures based on:
1) Instructions streams
2) Data streams
SISD traditional UP systems
SIMD vector units, examples?
MISD - Generally not used
MIMD - multiple computers, each has: PC, instructions, data
Memory
- Shared memory systems (MP) vs. no shared memory
Interconnect bus, switch
Performance (Latency/Bandwidth)
- Depends on coupling

Bus-based Multiprocessors
Symmetric Multi-Processors
- All CPUs connected to one bus
- Memory accessed via shared bus
- Symmetric view of system from all CPUs
- Bus is the bottleneck but caches help!
- Write-through vs. Write-back

Src: wikipedia.org

Rings, Switched Multiprocessors


Rings used to connect cores when core count is low
Most current CPUs use a ring topology not for long
Memory and I/O constitute ring stops
Transactions arbitrate to get on ring, transit to dest stop

Cross-bar switch used to connect memory, IO,


devices with CPUs
Current and future many-core CPUs use mesh, torus
topologies
Memory, I/O, etc. use agents for coherency; for meshes
positioned at edges
Still maintain memory and cache coherency with fabric

NUMA

Rings, Switched Multiprocessors

Intel Jaketown

Sun UltraSPARC T2

Example Torus Multiprocessor

Tilera-Gx

Multi-computers
No shared memory

Accessing remote nodes is expensive (how expensive?)

No shared clocks

Why is this a problem?

Communication medium typically a network

Not a dedicated bus


Ethernet, Myrinet, Infiniband, etc.

Distributed Systems?
Multi-computers connected via network.
Single system image
Each node is autonomous
8

Nodal Communication
Dedicated

Circuit, bus, ribbon cable, etc.

Shared
.

How to share a communication medium?

Nodal Communication
-

How to share?
-

Multiplexing
-
-
-

Frequency multiplexing
Take turns e.g. TDMA
Packets

Shared communication links:


-

Circuit switched use short fixed time slots (e.g. TDM)


-
-

Example? Performance?
http://en.wikipedia.org/wiki/Time_division_multiplexing

Packet switched use variable sized time slots


-
-
-

Time, but not fixed time.


Example?
http://en.wikipedia.org/wiki/Packet_switching

What is most commonly used?


10

Networks

1976 Ethernet, National Computer Conference, Robert Metcalfe


1980 Introduced as standard (Xerox, DEC, Intel)
Speed
- Originally 2.94 Mbps
- this Ethernet, 10BaseT, 100 Mbps, 802.11b,XXXX, 10/40/100 Gbps
1985 1961 hosts on internet.
014 - ~1B hosts
11

Statistical multiplexing
Sender
Sender
Sender
Sender

Switches arbitrate between inputs


Any input that is ready may be sent
Reduces idle links if data or traffic is ready to be sent

What networks can we build with these tools?


12

Internet
A distributed network of distributed networks
All using a common protocol (IP)
Logically linked together by a globally unique address space
based on the Internet Protocol (IP) or its subsequent extensions
and follow ons*

*Src: http://www.unc.edu/~unclng/Internet_History.htm

13

Protocols
Agreement on how
communication should take place
Define communication details
Syntax:

Me (waiting)

Data encoding, language, etc.

Semantics:
Error handling, termination, request
ordering, responses

All levels hardware, software


Example: ordering at drive-thru

Pleasant
Greeting

Me

1 Quad Grande
Cappuccino
$3000

Me

Whatever it
takes

Great, please pull


around

Me
14

Protocol Layers and Interfaces


Network protocols generally organized in layers
Each protocol offers an interface and expects one
from the layers on which it builds
Syntax and semantics
Data formats

Protocols build upon each other


Each should add value

For example, add reliability on top of an unreliable medium

Modular and reusable

OS provides TCP, so apps dont have to rewrite


Each layer may be replaced without replacing adjacent layers

Higher-level SW does not have to build and send


Ethernet packets
15

Common Protocol
Where to unify?
How to physically connect machines?
Possible choices?
Optical, electrical, wireless, birds, tin cans and a string,
smoke signals,

Should physical layer be common? Discussion?


Reference model for protocol layers created by ISO
International Organization for Standardization

16

OSI Model Layer 1


Transmit/receive raw data to/
from communication medium
Media, voltage levels, speed,
connectors
Does not care about
contents
Deals with representing bits

Examples: 802.11, Bluetooth, USB, etc.

Physical
17

OSI Model Layer 2


Organizes data into frames
before passing down to L1
Sequences packets
Detects errors
Corrects errors
Accepts ACKs from
(immediate) receiver
Examples: Ethernet MAC, PPP

2
1

Link
Physical

Ethernet switches work at L2

Forwards ethernet frames

18

OSI Model Layer 3


Relay and route information
to destination
Manage journey of
datagrams and figure out
intermediate hops
Datagrams

3
2
1

Network
Link
Physical

Examples: IP, X.25

IP routers work at L3

Determine which interface to


send out IP packets
Enables multiple networks to be
connected together

19

OSI Model Layer 4


Interface for end-to-end
communication
Sends and receives
segments of data.
Manages Flow Control
May include end-to-end
reliability
4

Transport

Network
Link
Physical

2
1

Examples: TCP, UDP

20

OSI Model Layer 5

5
4
3
2
1

Session
Transport
Network
Link
Physical

Services to coordinate
dialogue and manage data
exchange
Software implemented
switch
Manage multiple logical
connections
Keep track of who is talking
Establish communications
End communications

Examples: HTTP 1.1, SSL

21

OSI Model Layer 6

6
5
4
3
2
1

Deal with objects


Data representation
What do the data bits mean?
Convert between machine
representations

Presentation
Session
Transport
Network
Link
Physical

Examples: XDR, ASN.1, MIME, XML

22

OSI Model Layer 7

7
6
5
4
3
2
1

Application
Presentation
Session
Transport

Application-specific protocols
Web (HTTP)
Email (SMTP, POP, IMAP)
File transfer (FTP)
Directory Services (LDAP)

Network
Link
Physical
23

Communication between nodes


7
6
5
4
3
2
1

Application
Presentation
Session
Transport
Network
Link
Physical

Logical

Reality

Application
Presentation
Session
Transport
Network
Link
Physical

Logically, each layer communicates with other nodes at


their respective layers
In reality, communication between two respective layers
must transit the stack
24

OSI Model

Src:

25

OSI Model

26

Internet Protocol
Set of protocols to handle the interconnection of local
and wide-area networks that make up the internet
Routing is key in the IP layer to transition between
networks
Must be common amongst networks

At network layer, IP is connectionless


Consequence? No state is required to be saved at
intermediate routers. Implications?

Enable multiple paths for data


What does this mean?

27

Protocol Encapsulation
At each level, higher level protocol details are data

Data

28

Protocol Encapsulation
IP packets sent within Ethernet packets
Packet sizes dependent on configured MTU

TCP Packets sent within IP packets


HTTP request sent as a stream of TCP packets
inside IP packets inside

29

TCP/IP stack vs. OSI

Conceptually simplifies OSI stack


30

Addressing machines/nodes
How to address unique machines?
Link Layer (L2)
MAC address 48-bit address: a0:88:b4:c7:70:7c
Useful? (WOL)

Network layer (L3)


IP address ipv4/ipv6 32bit/128bit
172.24.222.44
Useful?

Transport Layer (L4)


2 Transport-layer protocols
TCP vs. UDP

31

IP Transport Layer
TCP: Transmission Control Protocol

Connection-oriented
OS maintains state
Full-Duplex both sides can send messages over same link
Reliable data transfer retransmission

Many congestion control algorithms developed and in use

Sequence Numbers used for in-order data transmission

UDP: User Datagram Protocol

Lighter-weight protocol
Connectionless service
Data may be (silently) lost
No guarantees on ordering
OS drops bad (checksum failures) packets
32

Addressing applications
Communication endpoints
Use 16-bit port numbers, which are transport layer endpoints
Application to application communication
Specific data streams

Well known port numbers defined for some services

IANA (Internet Assigned Numbers Authority)


ssh: 22/TCP smtp: 25/TCP http: 80/TCP ntp: 123/UDP
Proprietary apps: 1024-49151
Dynamic/private: 49152 65535

Communication with apps:


Use Transport layer protocol
IP address and Port number
33

Network API
Access needed to network at application level
Clearly.

Network Application Programming Interface (API)


Core provided by OS
Changing congestion control algorithm from a CSMA/CA
variant to CSMA/CD variant for example

Libraries, libraries, libraries

34

Connection-oriented vs. Connection-less


Connection-oriented
1. Establish connection
2. Negotiate protocol
3. Exchange data
4. Terminate

Connection-less
1. No call set up
2. Send/Receive data
3. No Termination

- Illusion of dedicated
channel
- Messaging ordered

Datagram service
- No guarantee of
delivery
- No endpoint state
- Cheaper
35

You might also like