next up previous contents
Next: Distributed Coordination Up: Distributed Systems Previous: Distributed Systems   Contents

Systems/Networks [223]





DS: Naming [224]

daemon name_server() {              
  while (1) { 
    receive(&name,&pid); 
    send(pid,lookup(name));
  }
}



DS: Circuit Switching [225]



DS: Store-and-Forward Switching [226]



DS: Contention [227]



DS: ISO Network Model [228]





\begin{picture}(635,329)(80,485)
\thicklines\put(170,765){\vector( 0, 1){ 0}}
\p...
...(495,800){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{computer B}}}
\end{picture}






DS: ISO Layers [229]



DS: TCP/IP [230]



DS: Distributed OS [231]



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]





\begin{picture}(762,229)(19,600)
\thicklines\put( 60,720){\oval(82,42)}
\put(180...
...}}
\put(725,715){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{man}}}
\end{picture}






DS: NFS - (Client and Server) [234]





\begin{picture}(755,394)(20,435)
\thicklines\put( 20,585){\framebox (125,55){}}
...
...\put(195,815){\makebox(0,0)[lb]{\raisebox{0pt}[0pt][0pt]{client}}}
\end{picture}





next up previous contents
Next: Distributed Coordination Up: Distributed Systems Previous: Distributed Systems   Contents
Ted Billard 2001-11-17