os fall’02 introduction to networking and distributed systems operating systems fall 2002

Post on 21-Dec-2015

225 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

OS Fall’02

Introduction to Networking and Distributed Systems

Operating SystemsFall 2002

OS Fall’02

Overview Intro to Networking

Review of Basic principles: layers, protocols, etc…

TCP/IP and the InternetImplementation issues

Intro to Distributed systemsclient/server

OS Fall’02

Communication in everyday life

I like rabbits

Ik houvankonijnen

L: Dutch

J’aimeleslapins

Ik houvankonijnen

L: Dutch

Ik houvankonijnen

L: Dutch

Fax#

Ik houvankonijnen

L: Dutch

Fax#

OS Fall’02

Computer based communication

mail mail

mail mail

encode encode

message

messagerep

OS Fall’02

Computer based communication

mail mail

encode encodemessagerep

mail mail

encode encode

packetspackets

mess rep pkt age rep pkt

OS Fall’02

Computer based communication

mail mail

encode encode

packetspackets

routeroute route

message rep pkt addr

OS Fall’02

Computer based communication

mail mail

encode encode

packetspackets

routeroute route

message rep pkt addr ECC

errorerror error

OS Fall’02

Layered organization Computer networks are structured

as layer (protocol) stacks Each layer provides services to the

layer above Layers communicate by protocols

protocol

service service APIAPI

OS Fall’02

Protocols Protocol is a collection of message

formats and their interpretation needed to implement the layer service

format: header+dataheaders convey the protocol specific information

OS Fall’02

Standards and openness Protocols must be standardized for interoperability

Layer APIs must be standardized for portability

Existing standards:ISO OSI Layered model (“eight-layer model”)TCP/IP is a de-facto model of the Internet

OS Fall’02

ISO OSI Layered modelApplication

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

OS Fall’02

Lower OSI Layers Physical layer:

Voltages to represent 0/1, how many bits per second can be sent, simplex/duplex, hardware

Data Link layer:Grouping bits into frames, point-to-point reliability, error detection/correction

OS Fall’02

Network and Transport Network layer:

Getting data from one host to another Routing, addressing,

fragmentation/reassembly

Transport layer: End-to-end application connectivityReliable transport connection: Messages are not lost and delivered in the

order they were sent Transmission Control Protocol (TCP)

OS Fall’02

Session and Presentation Session layer:

Enhanced transport layer: session control

Presentation layer:Message structure: e.g., recordsData representationcompression and encryption

OS Fall’02

Application Layer General-purpose high level services

and abstractionsFile transfer (FTP)Hyper-text transfer (HTTP)Remote Procedure Call (RPC)Network File System (NFS)Object Request Brokers CORBA, Java RMI

Etc...

OS Fall’02

TCP/IP Protocol Suite

Application

Presentation

Session

Transport

Network

Datalink

Physical

Application

TCP/UDP

IP

Physical

OSI model TCP/IP protocol suite

Network access

OS

Hardware

OS Fall’02

Physical Networks Each computer is directly attached to

some physical networkNetwork Interface Cards (NIC)+cablesUsually limited geographical scale (Local Area Network=LAN) MAN, WAN

supports routing, addressing, network access within its boundaries

LAN: Ethernet (10Mbit/sec, 100Mbit/sec), Token ring, Fibre channel, etc...

OS Fall’02

Physical networks characteristics

Bandwidth: Number of bits per second

Latency: The time it takes to send a single bit

Ethernet: Shared bus bandwidth: 10Mbit/secSwitched Ethernet bw: 100Mbit/sec

OS Fall’02

Ethernet LAN

Ethernet

IBM Compatible

IBM Compatible

IBM Compatible IBM Compatible

IBM Compatible

Shared bus Each NIC has a

unique address Messages are

broadcastIf collision occurs, wait for a randomly chosen time period and retry Maximum Transfer Unit

(MTU) = 1536 Bytes

OS Fall’02

Internet protocol (IP) Creates an illusion of a single

physical network over a collection of heterogeneous LANs

Global addressing, routingFragmentation, reassembly to overcome differences in the MTU sizes

Architecture: LANs interconnected by routers (gateways)

OS Fall’02

Internet Protocol (IP) Connectionless

Each packet is routed independently based on the IP address in the header

Connections are supported by the transport layer (TCP)

OS Fall’02

The Internet

Ethernet

Token-ring

Ethernet

IBM Compatible

IBM Compatible

IBM Compatible

IBM Compatible

Hub

Ethernet

IBM Compatible

IBM Compatible

IBM Compatible

IBM Compatible

Hub

IBM CompatibleIBM Compatible

HubIBM Compatible

IBM Compatible

OS Fall’02

The Internet

In ternetIP pro toco l

Computer

W orkstation

W orkstation

Mainframe

Minicomputer

Laptop

Laptop

Minicomputer

OS Fall’02

TCP/IP transport protocols

Connectivity between application end-points

Application end-point is uniquely identified by (IP address,port number)

Transmission Control Protocol (TCP)Reliable end-to-end byte stream, connection oriented

User Datagram Protocol (UDP)Unreliable, connectionless

OS Fall’02

Implementation issues Reliability Flow control Routing

OS Fall’02

Reliability Physical networks are inherently

unreliableMessages can be both: corrupted and lost

Dealing with corruptionError detection, error correction

Dealing with message lossretransmission

OS Fall’02

Error detection/correction Parity bit is the simplest error

detection techniqueParity bit is the binary sum of the message bitsDetects corruption of a single bit

More parity bits are needed for error correction

OS Fall’02

Error correction Forward Error Correction (FEC)

A bit at position holds parity of bits whose positions includes in its binary representation

The positions of wrong parity bits yield the position of the erroneous bit

Corrects a single bit error

In practice more sophisticated techniques are used (e.g., CRC)

0,2 iii2

OS Fall’02

Dealing with message loss Timeouts

Send a message, wait for an acknowledgment (ACK)If an acknowledgment does not arrive during a predefined timeout period: retransmit the message If ack is lost a message can be sent more

than once!

Negative acknowledgments

OS Fall’02

Flow control Sender and received have limited buffer

space to hold outgoing and incoming messages

Flow control is needed to avoid buffer overflow

The simplest technique:The receiver buffer size in known in advanceSender never sends a new message until it knows that the receiver has enough space to accommodate it

OS Fall’02

Routing Each router holds a table indicating

the next router (hop) on the way to each destination

The next hop router must reside on the same physical network (LAN)

Routers exchange messages to update their routing tables

Protocols: Distance Vector (Bellman-Ford), Open Shortest Path First (OSPF)

OS Fall’02

Distributed Systems A distributed system (middleware) is an

implementation of an application level service

Distributed systems support high level abstractions

Remote Procedure Call (RPC): everything looks like a local function call

Network File System (NFS): everything looks like a local file

Object Based systems: Everything looks like a local object

OS Fall’02

Client/Server Paradigm Distributed systems are usually

structured according to the client/server model

A server implements a service Clients request service from the

server using a pre-defined protocol WWW, FTP, Telnet, NFS are all

client/server based

OS Fall’02

Internet Well-known services Well-known services must be

supported by all the computers connected to the Internet

Ftp, telnet, rlogin, nfs

Domain Name Service (DNS)Symbolic name <-> IP address

Uniquely identified by the port number of the server

HTTP: 80, FTP: 20

OS Fall’02

RPC A server registers a procedure

implementation A client calls a function which looks

local to the clientE.g., add(a,b)

The RPC implementation packs (marshals) the function name and parameter values into a message and sends it to the server

OS Fall’02

RPC Server accepts the message,

unpacks (unmarshals) parameters and calls the local function

Return values is then marshaled into a message and sent back to the client

Marshaling/unmarshaling must take into account differences in data representation

OS Fall’02

RPC Transport: both TCP and UDP Data types: atomic types and non-

recursive structures Pointers are not supported Complex memory objects (e.g.,

linked lists) are not supported NFS is built on top of RPC

OS Fall’02

Next: Storage Area Networks and Modern storage architectures

top related