Next: Distributed Coordination
Up: Distributed Systems
Previous: Distributed Systems
  Contents
- Local-Area Networks (LANs):
- small geographical area
- multiaccess bus (Ethernet), ring, star
- cables: 1 megabyte/sec
- optical networks: 1 gigabit/sec
- one or more gateways to other networks
- Wide-Area Networks (WANs):
- large geographical area (Internet)
- relatively slow (1200 bits/sec to 1 megabyte/sec)
- unreliable
- telephone lines, microwave links, and satellite channels
- communication processors
- routers
DS: Naming [224]
- how does a process locate another host?
- domain name service (DNS)
- host name, identifier
- bob.cs.brown.edu
- request to name server edu for address of server for brown.edu
- edu must be known address
- request to edu.brown for address for cs.brown.edu
- request to cs.edu.brown for address for bob.cs.brown.edu
- implies Internet address 128.148.31.100
- relies on caches for better performance
- name server is in ``wait'' state:
daemon name_server() {
while (1) {
receive(&name,&pid);
send(pid,lookup(name));
}
}
DS: Circuit Switching [225]
- how do two processes communicate with each other?
- session s is allocated transmission rate r_s bits/sec
- fixed path established between two sites
- each link guarantees portion r_s (say by time multiplexing)
- if path cannot be found, then reject session
- like telephone switching
- which has equal session transmission rates
- very inefficient for data networks
- short bursts of high activity
- lengthy inactive periods
DS: Store-and-Forward Switching [226]
- each session is initiated without reserved allocation
- no multiplexing of links - use full transmission rate
- links are fully utilized when there is traffic
- packets are queued - waiting for transmission
- decreases delay relative to circuit switching
- needs (feedback) control mechanism to reduce queueing delays
- message switching:
- store-and-forward with arbitrary message sizes
- must be broken into packets
- packet switching: store-and-forward
- virtual circuit routing: store-and-forward but on a fixed path
- uses full transmission rate of links
- dynamic routing: store-and-forward but packet finds its own path
DS: Contention [227]
- several sites want to transmit simultaneously (bus/ring)
- CSMA: carrier sense with multiple access (bus)
- site must listen for a free link
- if a collision occurs, try again after a random amount of time
- good for lightly-loaded systems
- token passing: a token continually circulates around a ring
- site can send messages only when it possesses the token
- uniform performance
- message slots: fixed-length message slots circulate in the ring
- each slot can hold a fixed-sized message and control
- site must wait until an empty slot arrives
- sites must check control info for possible messages
DS: ISO Network Model [228]
- use (7) layered approach to deal with complexity
- each layer ``talks'' with corresponding layer on another computer
DS: ISO Layers [229]
- physical: mechanical and electrial transmission of a bit stream
- data-link: transmission of frames or packets
- network: routing of packets
- transport: transmission of messages as packets, maintaining order
- session: implement sessions and protocols (say rlogin)
- presentation: resolve differences in format
- application: interact directly with the user
DS: TCP/IP [230]
- TCP/IP: Transmission Control Protocol/Internet Protocol
- fewer levels, more difficult, more efficient
- IP: transmission of datagrams, basic unit of information
- TCP: uses IP to transport a reliable stream between two processes
- establish and maintain a connection
- UDP: User Datagram Protocol
- uses IP to transfer packets, but adds error correction
- connection-less
DS: Distributed OS [231]
- users are unaware of the underlying structure or operations
- access remote resources in the same manner as local resources
- data migration: data is transferred to sites which require access
- transfer entire file or only those portions necessary
- partial computation migration:
- synchronous: remote procedure call (RPC) using a datagram
- asynchronous:
- message to start new process for designated task
- both return results
- process migration (full computation migration):
- load balancing to even the workload
- computation speedup via concurrency
- hardware or software preference
- data access
DS: Remote Procedure Call (RPC) [232]
result = multiply(7,2); /*client*/
int multiply (x,y) { /*stub */
sprintf(str1,"%d %d",x,y); /*pack */
general_transport(name_server("multiply"),str1,&str2);
sscanf(str2,"%d",&result); /*unpack*/
return(result);
}
void general_transport (server,str1,str2) {
send(server,str1);
receive(*str2,&server); /*block */
}
/************** NETWORK **************/
daemon multiply_transport () {
while (1) {
receive(&str1,&client); /*block */
multiply_server_stub(str1,&str2);
send(client,str2);
} }
void multiply_server_stub (str1,str2) { /*stub */
sscanf(str1,"%d %d",&x,&y); /*unpack*/
result = multiply(x,y);
sprintf(*str2,"%d",result); /*pack */
}
int multiply (x,y) { return(x*y); } /*server*/
DS: Network Files System (NFS) [233]
- mount a remote directory
- tables of all mounts /etc/mtab also kept in kernel memory
DS: NFS - (Client and Server) [234]
Next: Distributed Coordination
Up: Distributed Systems
Previous: Distributed Systems
  Contents
Ted Billard
2001-11-17