24
Operating Systems: A Modern Perspective, Chapter 15 Slide 15-1 Copyright © 2004 Pearson Education, Inc. 15 Networks

Slide 15-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 15 15 Networks

Embed Size (px)

Citation preview

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-1

Copyright © 2004 Pearson Education, Inc.

15Networks

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-2

Copyright © 2004 Pearson Education, Inc.

Connecting Computers Using the Telephone Network

SerialPort

SerialPortMemoryMemory

CPUCPU

SerialPort

SerialPort MemoryMemory

CPUCPU

Switched Telephone NetworkSwitched Telephone Network

Modem Modem

Local Computer Remote Computer

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-3

Copyright © 2004 Pearson Education, Inc.

Ethernet (CSMA/CD)

• Asynchronous• Carrier Sense• Multiple Access• Collision Detection• Backoff

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-4

Copyright © 2004 Pearson Education, Inc.

Wireless

Backbone

•IEEE 802.11 (“WiFi”)•IEEE 802.15 (“Bluetooth”)

Ad hoc networks

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-5

Copyright © 2004 Pearson Education, Inc.

Stop-and-wait Flow Control

Sender transmits a frame;Sender sets a time-out on the transmission;Sender waits for an ACKnowledgment;...if (Sender receives ACKnowledgment) continue;if (frame times-out) Retransmit timed-out frame;(a) Transmitter Receiver accepts the frame; Receiver transmit the ACKnowledgment;(b) Receiver

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-6

Copyright © 2004 Pearson Education, Inc.

ISO OSI Model

NetworkData LinkPhysical

NetworkData LinkPhysical

•Physical/Data Link layer networks: Ethernet, Token Ring, ATM•Network layer net: The Internet

Examples

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-7

Copyright © 2004 Pearson Education, Inc.

Network Layer

• Primary purpose is to combine networks

• Internet protocol (IP) is dominant protocol

• Creates an internet address space

• Implements packet routing across networks

Host XHost X

Host RHost R Host SHost S Host YHost Y

Network B Network CNetwork A

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-8

Copyright © 2004 Pearson Education, Inc.

Addressing & Routing

Host XHost X

Host RHost R Host YHost Y

Network CNetwork A

3b4e87

3b4e62 3b4e55 3b621a

3b6209

•Host X does not know how to send to Host Y•Can send a frame to Host R for forwarding•What should it tell Host R?

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-9

Copyright © 2004 Pearson Education, Inc.

Addressing & Routing

Host XHost X

Host RHost R Host YHost Y

Network CNetwork A

•Host X does not know how to send to Host Y•Can send a frame to Host R for forwarding•What should it tell Host R?•Internet address spans all machines

3b4e87

3b4e62 3b4e55 3b621a

3b6209

128.123.234.033

128.123.234.188 128.229.244.006

128.229.244.109

128.123.234.063

To: 128.229.244.006From: 128.123.234.033Network Layer data

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-10

Copyright © 2004 Pearson Education, Inc.

Addressing & Routing

Host XHost X

Host RHost R Host YHost Y

Network CNetwork A

•Host X does not know how to send to Host Y•Can send a frame to Host R for forwarding •What should it tell Host R?•Internet address spans all machines•Send encapsulated packet to Host R with Host Y

3b4e87

3b4e62 3b4e55 3b621a

3b6209

128.123.234.033

128.123.234.188 128.229.244.006

128.229.244.109

128.123.234.063

To: 3b4e55From: 3b4e87

To: 128.229.244.006From: 128.123.234.033Network Layer data

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-11

Copyright © 2004 Pearson Education, Inc.

Addressing & Routing

Host XHost X

Host RHost R Host YHost Y

Network CNetwork A

•Host X does not know how to send to Host Y•Can send a frame to Host R for forwarding •What should it tell Host R?•Internet address spans all machines•Send encapsulated packet to Host R with Host Y

3b4e87

3b4e62 3b4e55 3b621a

3b6209

128.123.234.033

128.123.234.188 128.229.244.006

128.229.244.109

128.123.234.063

Host SHost S

Network B

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-12

Copyright © 2004 Pearson Education, Inc.

Addressing & Routing

Host XHost X

Host RHost R Host YHost Y

Network CNetwork A

•Host X does not know how to send to Host Y•Can send a frame to Host R for forwarding•What should it tell Host R?•Internet address spans all machines•Send encapsulated packet to Host R with Host Y•Data Link frame is received by Host Y

3b4e87

3b4e62 3b4e55 3b621a

3b6209

128.123.234.033

128.123.234.188 128.229.244.006

128.229.244.109

128.123.234.063

To: 3b621aFrom: ...

To: 128.229.244.006From: 128.123.234.033Network Layer data

Network B

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-13

Copyright © 2004 Pearson Education, Inc.

ISO OSI Model

TransportNetwork

Data LinkPhysical

TransportNetwork

Data LinkPhysical

•Physical/Data Link layer networks: Ethernet, Token Ring, ATM•Network layer net: The Internet•Transport layer net: TCP-based network

Examples

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-14

Copyright © 2004 Pearson Education, Inc.

ISO OSI & TCP/IP

MACMAC

ISO OSI NetworkISO OSI Network

ISO OSI TLIISO OSI TLI

ISO OSI SessionISO OSI Session

ISO OSI packet

ISO OSI frame

EthernetEthernet

ARPAnet IPARPAnet IP

ARPAnet TCPARPAnet TCP

ISO OSI SessionISO OSI Session

ISO OSI packet

IP frame

Ethernet packet

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-15

Copyright © 2004 Pearson Education, Inc.

First-Level Domain

.edu

.colorado

.cs

anchor

pawneeneon

.edu Domain

.colorado Domain

.cs Domain

• Supports TCP• Uses UDP

Domain Name Server (DNS)

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-16

Copyright © 2004 Pearson Education, Inc.

Sharing Names

(5623, 56, 2046)(3456, 77, 6785)

(9876, 88, 3434)(31978, 12, 1234)

Port 1234

Process A on Host #12 on Net #31978

Bind

The OS on Host #12 on Net #31978

send(…,(31978, 12, 1234), …);

Process BProcess A

Transport Layer Global Address Space

0x001a4772

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-17

Copyright © 2004 Pearson Education, Inc.

Internet and Protocols

Internetworking = Internet Protocol Model

■ ■ ■

FTP

TCP UDP

IP

NET 1 NET 2 NET n

HTTP NV TFTP

Data LinkPhysical

Network

Transport

Session

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-18

Copyright © 2004 Pearson Education, Inc.

UDP

• Datagram (“connectionless”) service– Similar to disk I/O level of service

• Logically associated with an IP packet & Data Link frame (but not physically)

• Best-effort delivery of datagrams, but:– Datagram may be dropped (lost)– Datagrams may be delivered out of order

• Efficient, relative to TCP

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-19

Copyright © 2004 Pearson Education, Inc.

UDP: Connectionless

Definitions -- Connectionless

Connectionless is modeled after the postal system. Each message (letter) carries the full destination address, and each one is routed through the system independent of all the others

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-20

Copyright © 2004 Pearson Education, Inc.

TCP

• Connected (or virtual circuit) protocol

• Interface allows programmer to read/write a byte stream over the network

• Byte stream is mapped into a series of packets– Reliable delivery– Each packet must be acknowledged– Effectively 2 packets per transmission

• Must open/close a connection before use

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-21

Copyright © 2004 Pearson Education, Inc.

TCP: Connection-Oriented

Definitions -- Connection-Oriented

Connection-oriented service is modeled after the telephone system

Pick up & dial the number

Talk

Hang up

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-22

Copyright © 2004 Pearson Education, Inc.

ISO OSI Model

PresentationSession

TransportNetwork

Data LinkPhysical

PresentationSession

TransportNetwork

Data LinkPhysical

•Physical/Data Link layer networks: Ethernet, Token Ring, ATM•Network layer net: The Internet•Transport layer net: TCP-based network•Presentation/Session layer net: http/html, RPC, PVM, MPI

Examples

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-23

Copyright © 2004 Pearson Education, Inc.

ISO OSI ModelApplicationPresentation

SessionTransportNetwork

Data LinkPhysical

ApplicationPresentation

SessionTransportNetwork

Data LinkPhysical

•Physical/Data Link layer networks: Ethernet, Token Ring, ATM•Network layer net: The Internet•Transport layer net: TCP-based network•Presentation/Session layer net: http/html, RPC, PVM, MPI•Applications, e.g., WWW, window system, numerical algorithm

Examples

Operating Systems: A Modern Perspective, Chapter 15

Slide 15-24

Copyright © 2004 Pearson Education, Inc.

A Firewall

Organization’sIntranet

FirewallFirewall

Internal HostInternal Host

Internal HostInternal Host Internal HostInternal Host

Internal HostInternal Host

Internet