16
Silberschatz, Galvin and Gagne 2002 15.1 Operating System Concepts Module 15: Network Structures Background Topology Network Types Communication Communication Protocol Robustness Design Strategies Silberschatz, Galvin and Gagne 2002 15.2 Operating System Concepts A Distributed System

Module 15: Network Structures - csee.umbc.edu

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Silberschatz, Galvin and Gagne 200215.1Operating System Concepts

Module 15: Network Structures

� Background

� Topology

� Network Types

� Communication� Communication Protocol

� Robustness

� Design Strategies

Silberschatz, Galvin and Gagne 200215.2Operating System Concepts

A Distributed System

Silberschatz, Galvin and Gagne 200215.3Operating System Concepts

Motivation

� Resource sharing✦ sharing and printing files at remote sites✦ processing information in a distributed database

✦ using remote specialized hardware devices

� Computation speedup – load sharing

� Reliability – detect and recover from site failure, functiontransfer, reintegrate failed site

� Communication – message passing

Silberschatz, Galvin and Gagne 200215.4Operating System Concepts

Network-Operating Systems

� Users are aware of multiplicity of machines. Access toresources of various machines is done explicitly by:

✦ Remote logging into the appropriate remote machine.✦ Transferring data from remote machines to local machines,

via the File Transfer Protocol (FTP) mechanism.

Silberschatz, Galvin and Gagne 200215.5Operating System Concepts

Distributed-Operating Systems

� Users not aware of multiplicity of machines. Access toremote resources similar to access to local resources.

� Data Migration – transfer data by transferring entire file,or transferring only those portions of the file necessary forthe immediate task.

� Computation Migration – transfer the computation, ratherthan the data, across the system.

Silberschatz, Galvin and Gagne 200215.6Operating System Concepts

Distributed-Operating Systems (Cont.)

� Process Migration – execute an entire process, or parts ofit, at different sites.

✦ Load balancing – distribute processes across network toeven the workload.

✦ Computation speedup – subprocesses can run concurrentlyon different sites.

✦ Hardware preference – process execution may requirespecialized processor.

✦ Software preference – required software may be availableat only a particular site.

✦ Data access – run process remotely, rather than transfer alldata locally.

Silberschatz, Galvin and Gagne 200215.7Operating System Concepts

Topology

� Sites in the system can be physically connected in avariety of ways; they are compared with respect to thefollowing criteria:

✦ Basic cost. How expensive is it to link the various sites inthe system?

✦ Communication cost. How long does it take to send amessage from site A to site B?

✦ Reliability. If a link or a site in the system fails, can theremaining sites still communicate with each other?

� The various topologies are depicted as graphs whosenodes correspond to sites. An edge from node A to nodeB corresponds to a direct connection between the twosites.

� The following six items depict various network topologies.

Silberschatz, Galvin and Gagne 200215.8Operating System Concepts

Network Topology

Silberschatz, Galvin and Gagne 200215.9Operating System Concepts

Network Types

� Local-Area Network (LAN) – designed to cover smallgeographical area.

✦ Multiaccess bus, ring, or star network.

✦ Speed ≈ 10 megabits/second, or higher.✦ Broadcast is fast and cheap.✦ Nodes:

✔ usually workstations and/or personal computers

✔ a few (usually one or two) mainframes.

Silberschatz, Galvin and Gagne 200215.10Operating System Concepts

Network Types (Cont.)

� Depiction of typical LAN:

Silberschatz, Galvin and Gagne 200215.11Operating System Concepts

Network Types (Cont.)

� Wide-Area Network (WAN) – links geographicallyseparated sites.

✦ Point-to-point connections over long-haul lines (often leasedfrom a phone company).

✦ Speed ≈ 100 kilobits/second.✦ Broadcast usually requires multiple messages.✦ Nodes:

✔ usually a high percentage of mainframes

Silberschatz, Galvin and Gagne 200215.12Operating System Concepts

Communication Processors in a Wide-Area Network

Silberschatz, Galvin and Gagne 200215.13Operating System Concepts

Communication

� Naming and name resolution: How do two processeslocate each other to communicate?

� Routing strategies. How are messages sent throughthe network?

� Connection strategies. How do two processes send asequence of messages?

� Contention. The network is a shared resource, so howdo we resolve conflicting demands for its use?

The design of a communication network must address four basicissues:

Silberschatz, Galvin and Gagne 200215.14Operating System Concepts

Naming and Name Resolution

� Name systems in the network

� Address messages with the process-id.

� Identify processes on remote systems by

<host-name, identifier> pair.

� Domain name service (DNS) – specifies the namingstructure of the hosts, as well as name to addressresolution (Internet).

Silberschatz, Galvin and Gagne 200215.15Operating System Concepts

Routing Strategies

� Fixed routing. A path from A to B is specified inadvance; path changes only if a hardware failure disablesit.

✦ Since the shortest path is usually chosen, communicationcosts are minimized.

✦ Fixed routing cannot adapt to load changes.✦ Ensures that messages will be delivered in the order in

which they were sent.

� Virtual circuit. A path from A to B is fixed for theduration of one session. Different sessions involvingmessages from A to B may have different paths.

✦ Partial remedy to adapting to load changes.✦ Ensures that messages will be delivered in the order in

which they were sent.

Silberschatz, Galvin and Gagne 200215.16Operating System Concepts

Routing Strategies (Cont.)

� Dynamic routing. The path used to send a messageform site A to site B is chosen only when a message issent.

✦ Usually a site sends a message to another site on the linkleast used at that particular time.

✦ Adapts to load changes by avoiding routing messages onheavily used path.

✦ Messages may arrive out of order. This problem can beremedied by appending a sequence number to eachmessage.

Silberschatz, Galvin and Gagne 200215.17Operating System Concepts

Connection Strategies

� Circuit switching. A permanent physical link isestablished for the duration of the communication (i.e.,telephone system).

� Message switching. A temporary link is established forthe duration of one message transfer (i.e., post-officemailing system).

� Packet switching. Messages of variable length aredivided into fixed-length packets which are sent to thedestination. Each packet may take a different paththrough the network. The packets must be reassembledinto messages as they arrive.

� Circuit switching requires setup time, but incurs lessoverhead for shipping each message, and may wastenetwork bandwidth. Message and packet switchingrequire less setup time, but incur more overhead permessage.

Silberschatz, Galvin and Gagne 200215.18Operating System Concepts

Contention

� CSMA/CD. Carrier sense with multiple access (CSMA);collision detection (CD)

✦ A site determines whether another message is currentlybeing transmitted over that link. If two or more sites begintransmitting at exactly the same time, then they will registera CD and will stop transmitting.

✦ When the system is very busy, many collisions may occur,and thus performance may be degraded.

� SCMA/CD is used successfully in the Ethernet system,the most common network system.

Several sites may want to transmit information over a link simultaneously. Techniques to avoid repeated collisions include:

Silberschatz, Galvin and Gagne 200215.19Operating System Concepts

Contention (Cont.)

� Token passing. A unique message type, known as atoken, continuously circulates in the system (usually aring structure). A site that wants to transmit informationmust wait until the token arrives. When the sitecompletes its round of message passing, it retransmitsthe token. A token-passing scheme is used by the IBMand Apollo systems.

� Message slots. A number of fixed-length message slotscontinuously circulate in the system (usually a ringstructure). Since a slot can contain only fixed-sizedmessages, a single logical message may have to bebroken down into a number of smaller packets, each ofwhich is sent in a separate slot. This scheme has beenadopted in the experimental Cambridge DigitalCommunication Ring

Silberschatz, Galvin and Gagne 200215.20Operating System Concepts

Communication Protocol

� Physical layer – handles the mechanical and electricaldetails of the physical transmission of a bit stream.

� Data-link layer – handles the frames, or fixed-length partsof packets, including any error detection and recoverythat occurred in the physical layer.

� Network layer – provides connections and routes packetsin the communication network, including handling theaddress of outgoing packets, decoding the address ofincoming packets, and maintaining routing information forproper response to changing load levels.

The communication network is partitioned into the followingmultiple layers;

Silberschatz, Galvin and Gagne 200215.21Operating System Concepts

Communication Protocol (Cont.)

� Transport layer – responsible for low-level networkaccess and for message transfer between clients,including partitioning messages into packets, maintainingpacket order, controlling flow, and generating physicaladdresses.

� Session layer – implements sessions, or process-to-process communications protocols.

� Presentation layer – resolves the differences in formatsamong the various sites in the network, includingcharacter conversions, and half duplex/full duplex(echoing).

� Application layer – interacts directly with the users’ dealswith file transfer, remote-login protocols and electronicmail, as well as schemas for distributed databases.

Silberschatz, Galvin and Gagne 200215.22Operating System Concepts

Communication Via ISO Network Model

Silberschatz, Galvin and Gagne 200215.23Operating System Concepts

The ISO Protocol Layer

Silberschatz, Galvin and Gagne 200215.24Operating System Concepts

The ISO Network Message

Silberschatz, Galvin and Gagne 200215.25Operating System Concepts

The TCP/IP Protocol Layers

Silberschatz, Galvin and Gagne 200215.26Operating System Concepts

Robustness

� Failure detection

� Reconfiguration

Silberschatz, Galvin and Gagne 200215.27Operating System Concepts

Failure Detection

� Detecting hardware failure is difficult.

� To detect a link failure, a handshaking protocol can beused.

� Assume Site A and Site B have established a link. Atfixed intervals, each site will exchange an I-am-upmessage indicating that they are up and running.

� If Site A does not receive a message within the fixedinterval, it assumes either (a) the other site is not up or (b)the message was lost.

� Site A can now send an Are-you-up? message to Site B.

� If Site A does not receive a reply, it can repeat themessage or try an alternate route to Site B.

Silberschatz, Galvin and Gagne 200215.28Operating System Concepts

Failure Detection (cont)

� If Site A does not ultimately receive a reply from Site B, itconcludes some type of failure has occurred.

� Types of failures:- Site B is down

- The direct link between A and B is down- The alternate link from A to B is down

- The message has been lost

� However, Site A cannot determine exactly why the failurehas occurred.

Silberschatz, Galvin and Gagne 200215.29Operating System Concepts

Reconfiguration

� When Site A determines a failure has occurred, it mustreconfigure the system:

1. If the link from A to B has failed, this must be broadcastto every site in the system.

2. If a site has failed, every other site must also benotified indicating that the services offered by the failedsite are no longer available.

� When the link or the site becomes available again, thisinformation must again be broadcast to all other sites.

Silberschatz, Galvin and Gagne 200215.30Operating System Concepts

Design Issues

� Transparency – the distributed system should appear asa conventional, centralized system to the user.

� Fault tolerance – the distributed system should continueto function in the face of failure.

� Scalability – as demands increase, the system shouldeasily accept the addition of new resources toaccommodate the increased demand.

� Clusters – a collection of semi-autonomous machinesthat acts as a single system.

Silberschatz, Galvin and Gagne 200215.31Operating System Concepts

Networking Example

� The transmission of a network packet between hosts onan Ethernet network.

� Every host has a unique IP address and a correspondingEthernet (MAC) address.

� Communication requires both addresses.� Domain Name Service (DNS) can be used to acquire IP

addresses.� Address Resolution Protocol (ARP) is used to map MAC

addresses to IP addresses.� If the hosts are on the same network, ARP can be used. If

the hosts are on different networks, the sending host willsend the packet to a router which routes the packet to thedestination network.

Silberschatz, Galvin and Gagne 200215.32Operating System Concepts

An Ethernet Packet