COP 5611 Operating Systems Spring 2010 Dan C

  • Slides: 46
Download presentation
COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office

COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2: 00 -3: 00 PM

Lecture 10 n n n Reading Assignment: Chapter 7 from the online textbook A

Lecture 10 n n n Reading Assignment: Chapter 7 from the online textbook A progress report for the project is due on every Monday. Last time: ¨ n Network properties Today: Layering ¨ Link layer ¨ Network layer ¨ n Next time ¨ Routing 2

3

3

Recovery of lost packets 4

Recovery of lost packets 4

Duplicate requests 5

Duplicate requests 5

Delays and recovery lead to duplicate response 6

Delays and recovery lead to duplicate response 6

Layering n n Simplify the design Example- RPC 7

Layering n n Simplify the design Example- RPC 7

Client-server communication based on RPC 8

Client-server communication based on RPC 8

9

9

10

10

Multiple protocols may be supported at each layer 11

Multiple protocols may be supported at each layer 11

Multiplexing and Demultiplexing 12

Multiplexing and Demultiplexing 12

Network layers for store and forward networks n Every module has three interfaces: To

Network layers for store and forward networks n Every module has three interfaces: To the layers above ¨ To the layers below ¨ To the peer layer on another system ¨ n n Each layer hides the operation of the layer below from the layer above and provides its own interpretation of the important features of the layers below. A minimum of three layers are necessary: Link layer move data from one point to another. Includes ¨ Network layer forward data through intermediate node towards the destination ¨ End-to-end-layer provides all the functions required by the application including ¨ n Encapsulation: each layer treats information received from the layers above as raw data and adds control information (headers and trailers) understood only by its peer. 13

Link layer 14

Link layer 14

Network layer 15

Network layer 15

End-to-end layer 16

End-to-end layer 16

Layering in different network architectures n OSI –has 7 layers ¨ The upper four

Layering in different network architectures n OSI –has 7 layers ¨ The upper four layers are: n n n Application Presentation translate data formats and emulate the semnatics of RPC Transport deal with lost, duplicate, out of order, segments Session deals with connectivity Internet is based on a model including Application ¨ Transport – transports segments ¨ Network – transports packets ¨ Data Link – transports frames ¨ n n Applications are very diverse and it makes no sense for a lower layer to implement functions required by higher layers. The end-to-end argument application knows best 17

Example of an end-to end argument n n Should we have a checksum implemented

Example of an end-to end argument n n Should we have a checksum implemented at the link layer or should leave it for the application protocol e. g. , a file transfer protocol? If we implement it at the link layer Advantage: detect earlier an error ¨ Disadvantage: the data may still be affected by errors when buffered at the upper layers. ¨ 18

Application, Transport, Network, and Data Link Layer Protocols

Application, Transport, Network, and Data Link Layer Protocols

Hourglass communication model 20

Hourglass communication model 20

Network composition n Network composition: Mapped composition A network layer is built directly on

Network composition n Network composition: Mapped composition A network layer is built directly on another network layer by mapping directly higer-layer network addresses to lower-layer network addresses. Example: n Internetworking interconnect several networks together, e. g. , the Internet ¨ Recursive composition a network layer rests on a link layer that it is itself a complete network. Examples: n Overlay networks. E. g. , Gnutella ¨ 21

Network composition. The overlay network Gnutella uses for its link layer an end-to-end transport

Network composition. The overlay network Gnutella uses for its link layer an end-to-end transport protocol of the Internet. In turn, the Internet uses for one of its links an end -to-end transport protocol of a dial-up phone system 22

More about the link layer n n Function: push bits from one place to

More about the link layer n n Function: push bits from one place to another In this architecture the link layer combines: MAC (medium access control layer) ¨ The physical layer ¨ n n n Analog worlds Capacity of a communication channel Capacity of a noisy communication channel C= B x log (1+ signal/noise) B is the bandwidth in Hz signal/noise – ratio of signal power to noise power Signals attenuation Signals are distorted over long distances 23

Serial transmission 24

Serial transmission 24

How to push bits from A to B which do not share the same

How to push bits from A to B which do not share the same clock? First raise the READY line 25

Signal attenuation and shape distortion 26

Signal attenuation and shape distortion 26

Error detection and error correction n n Encode data with an error detection code.

Error detection and error correction n n Encode data with an error detection code. Use error correction if necessary. 27

Framing n n A pattern of bits serve as a frame delimiter – e.

Framing n n A pattern of bits serve as a frame delimiter – e. g. , seven 1’s Bit stuffing: The sender: add a 0 whenever it encounters a pattern of six 1’s in data ¨ The receiver: remove a 0 following a pattern of six 1’s in data ¨ n n Add a frame header Add a frame trailer 28

Sender bit stuffing procedure 29

Sender bit stuffing procedure 29

Receiver bit stuffing procedure 30

Receiver bit stuffing procedure 30

A network protocol may use multiple data link protocols 31

A network protocol may use multiple data link protocols 31

Multiple transport and data link protocols 32

Multiple transport and data link protocols 32

Sending a frame 33

Sending a frame 33

Receiving a frame 34

Receiving a frame 34

Link properties n We distinguish several types of links: Point-to-point ¨ Broadcast links ¨

Link properties n We distinguish several types of links: Point-to-point ¨ Broadcast links ¨ n Each link imposes a maximum transmission unit (MTU) the largest frame size which affects Timing, un upper bound on link commitment time ¨ Error, the longer the frame the larger the probability of error for a given error rate on the link ¨ Buffer space at each end ¨ 35

The network layer n A network can be viewed as consisting of Network core

The network layer n A network can be viewed as consisting of Network core – carries out segments from one communicating entity to another ¨ Network periphery – hosting the communicating entities at attachment points ¨ n Addressing – each communicating entity must have a unique address. 36

37

37

Internet Core and Edge 38

Internet Core and Edge 38

Router 39

Router 39

Router supporting Qo. S (Quality of Service) 40

Router supporting Qo. S (Quality of Service) 40

Network model n n The network layer transports packets The network core consists of

Network model n n The network layer transports packets The network core consists of routers which forward packets using routing tables The input for network layer on a host at the periphery of the network is a segment in a segment buffer at the transport layer. The output is a link buffer 41

42

42

43

43

44

44

All hosts must have logical addresses n n All devices have a physical address

All hosts must have logical addresses n n All devices have a physical address of the interface Must obtain a logical address 45

Dynamic IP address assignment -DHCP

Dynamic IP address assignment -DHCP