Operating Systems CMPSCI 377 Lecture 19: Network Structures

27
UNIVERSITY OF NIVERSITY OF MASSACHUSETTS ASSACHUSETTS, A , AMHERST MHERST Department of Computer Science Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture 19: Network Structures

description

Operating Systems CMPSCI 377 Lecture 19: Network Structures. Emery Berger University of Massachusetts Amherst. Next Few Classes. Networking basics Distributed services e-mail, www, telnet Distributed operating systems Distributed file systems. Distributed Systems. - PowerPoint PPT Presentation

Transcript of Operating Systems CMPSCI 377 Lecture 19: Network Structures

Page 1: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science

Emery BergerUniversity of Massachusetts Amherst

Operating SystemsCMPSCI 377

Lecture 19: Network Structures

Page 2: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 2

Next Few Classes

Networking basics Distributed services

e-mail, www, telnet Distributed operating systems Distributed file systems

Page 3: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 3

Distributed Systems distributed system: set of physically separate

processors connected by one or more communication links

no shared clock or memory

Many systems today distributed in some way e-mail, file servers, network printers, remote

backup, web...

P2

P1

P3P4

Page 4: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 4

Parallel vs. Distributed Systems

Tightly-coupled systems: “parallel processing” Processors share clock, memory, run one OS Frequent communication

Loosely-coupled systems: “distributed computing” Each processor has own memory, runs

independent OS Infrequent communication

Page 5: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 5

Advantages of Distributed Systems

Resource sharing Computational speedup Reliability Communication

Page 6: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 6

Advantages of Distributed Systems

Resource sharing Resources need not be replicated

Shared files Expensive (scarce) resources can be

shared Color laser printers

Processors present same environment to user

Keeping files on file server

Page 7: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 7

Advantages, continued

Computational speedup n processors = n times computational

power SETI@home

Problems must be decomposable into subproblems

Trivial = embarrassingly parallel Coordination & communication

required between cooperating processes

Synchronization Exchange of results

Page 8: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 8

Advantages, continued

Reliability Replication of resources provides fault

tolerance One node crashes, user works on another

one Performance degradation but system

available Must avoid single point of failure

Single, centralized component of system Example: central file servers

Page 9: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 9

Advantages, continued

Communication Users/processes on different

systems can communicate Mail, transaction processing

systems like airlines & banks, www

Page 10: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 10

Distributed Systems Issues

Operating systems support for distribution Communication & networks Transparency Security Reliability Performance & scalability Programming models

Page 11: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 11

Networks Goal: provide efficient, correct, robust

message passing between two separate nodes

Local area network (LAN) – connects nodes in single building, fast & reliable (Ethernet) Media: twisted-pair, coax, fiber Bandwidth: 10-100MB/s

Wide area network (WAN) – connects nodes across large geographic area (Internet) Media: fiber, microwave links, satellite channels Bandwidth: 1.544MB/s (T1), 45 MB/s (T3)

Page 12: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 12

Network Topologies

Connection of nodes impacts: Maximum & average communication

time Fault tolerance Expense

Two basic topologies: Point-to-point Bus

Page 13: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 13

Point-to-Point Network Topologies

Fully-connected Each message takes one “hop” Node failure – no effect on communication

with others Expensive – impractical for WANs

Page 14: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 14

Point-to-Point Network Topologies

Partially connected Links between some, but not all nodes Less expensive, less tolerant to failures

Single node failure can partition network Sending message takes several hops

Needs routing algorithms

Page 15: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 15

Point-to-Point Network Topologies

Tree structure: network hierarchy Messages fast between direct descendants

Max message cost? Not failure tolerant

Any interior node fails – network partitioned

Page 16: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 16

Point-to-Point Network Topologies

Star network: all nodes connect to central node Each message takes how many hops? Not failure tolerant Inexpensive – sometimes used for LANs

Page 17: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 17

Point-to-Point Network Topologies

One-directional ring Given n nodes, max hops? Inexpensive Fault-tolerant?

Page 18: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 18

Point-to-Point Network Topologies

Bi-directional ring Given n nodes, max hops? Inexpensive Fault-tolerant? One node? Two?

Page 19: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 19

Point-to-Point Network Topologies

Doubly-connected ring: nodes connected to neighbors & one more distant Given n nodes, max hops? Fault-tolerant? More expensive

Page 20: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 20

Bus Network Topologies

Bus nodes connect to common network

Linear bus – single shared link Nodes connect directly to each other via

bus Inexpensive (linear in # of nodes) Tolerant of node failures Ethernet LAN

Page 21: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 21

Bus Network Topologies

Ring bus – single shared circular link Same technology & tradeoffs as

linear bus

Page 22: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 22

Principles ofNetwork Communication Data broken into packets

Basic unit of transfer Packets sent through network Computers & routers at switching

points control packet flow

Road analogy: Packets = cars Network = roads Computer = traffic lights (intersection) Too many packets on shared link/node =

traffic jam

Page 23: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 23

Communication Protocols

Protocol: agreed-upon rules for communication

Protocol stack: layers that comprise networking software Each layer N provides service to

layer N+1

Page 24: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 24

Traditional Layers Application layer – applications that use the net Presentation layer – data format conversion

(big/little endian) Session layer – implements communication

strategy(e.g., RPC)

Transport layer – reliable end-to-end communication

Network layer – routing & congestion control Data link control layer – reliable point-to-point

communication over unreliable channel Physical layer – electrical/optical signaling

across “wire”

Page 25: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 25

TCP/IP Protocol Stack

Internet standard protocol stack TCP: reliable protocol – packets received

in order UDP (user datagram protocol) – unreliable

No guarantee of delivery

Page 26: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 26

Packet Format Contains all info

needed to recreate original message

Packets may arrive out of order = need sequence number

Data segment contains headers for higher protocol layers & application data

Page 27: Operating Systems CMPSCI 377 Lecture 19: Network Structures

UUNIVERSITY OF NIVERSITY OF MMASSACHUSETTSASSACHUSETTS, A, AMHERST • MHERST • Department of Computer Science Department of Computer Science 27

Summary

Virtually all computer systems contain distributed components

Networks connect them Key tradeoffs:

Speed Reliability Expense