SlideShare una empresa de Scribd logo
1 de 55
By: Little goku
D/F b/w ds and uniprocessor:
 The single most important difference
between a distributed system and a
uniprocessor system is the
interprocess communication.
OSI (Open System Interconnection Reference model)
Presentation
Session
Data link
Network
Physical
Transport
Interface
Process A
Machine 1
Presentation
Sessionn
Data link
Network
Physical
Transport
Interface
Process B
Machine 2
Network
Application protocol
Presentation protocol
Session protocol
Transport protocol
Network protocol
Application Application
Data link protocol
Physical protocol
The physical layer
 This layer transmits the 0s and 1s. For
example:
 How many volts to use for 0 and 1
 How many bits per second can be sent
 Whether transmission can take place in both directions
simultaneously
 The size and shape of the network connector
 The number of pins and meaning of each one
 It is physical layer’s job to make sure:
send 0---receive 0 not 1.
The data link layer
 This layer is to detect and correct errors in
the physical layer. It groups the bits into
frames, and see that each frame is
correctly received.
 The data link layer does its work by putting a special bit
pattern on the start and end of each frame, to mark them, as
well as computing a checksum by adding up all the bytes in
the frame in a certain way.
The network layer
 The primary task of this layer is routing,
that is, how to choose the best path to
send the message to the destination.
 The shortest route is not always the best route.
What really matters is the amount of delay on a
given route. Delay can change over the course of
time.
 Two network-layer protocols:
 1) X.25 (telephone network) connection-
oriented
 2) IP (Internet protocol) connectionless
The transport layer
 This layer is to deliver a message to the
transport layer with the expectation that
it will be delivered without loss.
 Upon receiving a message from the session layer :
• The transport layer breaks it into pieces small
enough for each to fit in a single packet
• Assign each one a sequence number
• Send them all
 E.g. TCP, UDP
The session layer
 This layer is essentially an
enhanced version of the transport
layer.
 Provides dialog control, to keep track of
which party is currently talking
 Few applications are interested in
this and it is rarely supported.
Presentation Layer
 This layer is concerned with the
meaning of bits.
 E.g. people’s names, addresses,
amounts of money, and so on.
The Application Layer
 This layer is a collection of
miscellaneous protocols for common
activities such as electronic mail, file
transfer, and connecting remote
terminals to computers over a network.
Client-Server Model
Client
Kernel
Server
Kernel
Network
Request
Reply
Client-Server Model Layer
Request/Reply
Data link
Physical1
2
3
4
5
6
7
Advantages
 Simplicity: The client sends a request and gets
an answer. No connection has to be
established.
 Efficiency: just 3 layers. Getting packets from
client to server and back is handled by 1 and 2
by hardware: an Ethernet or Token ring. No
routing is needed and no connections are
established, so layers 3 and 4 are not needed.
Layer 5 defines the set of legal requests and
replies to these requests.
 two system calls: send (dest, &mptr), receive
(addr, &mptr)
Addressing
 1.the server’s address was simply
hardwired as a constant
 2.Machine # + Process #: 243.4 199.0
 3.Machine # + local-id
 Disadvantage: it is not transparent to the
user. If the server is changed from 243
to 170, the program has to be changed.
Cont……
 4. Assign each process a unique
address that does not contain an
embedded machine number. .
 Disadvantage: centralize does not scale to
large systems.
Cont……
 5. Let each process pick its own id from
a large address space, such as the
space of 64-bit binary integers.
 Disadvantage: broadcasting puts extra
load on the system.
Cont……
 6. provide an extra machine to map
high-level (ASCII) service names to
machine addresses. Servers can be
referred to by ASCII strings in the
program.
 Disadvantage: centralized component:
the name server
Cont……
 7. Use special hardware. Let process
pick random address. Instead of locating
them by broadcasting, locate them by
hardware.
Blocking versus
Nonblocking Primitives :
Client running
Trap to
kernel,
Process blocked
Client running
Return from kernel,
process released
Client blocked
Message being sent
Blocking send primitive
Nonblocking send primitive:
Client running
Trap
Client running
Client
blocked
Return
Message
copied to
kernel
buffer
Message being sent
Nonblocking primitives:
 Advantage: can continue execution
without waiting.
 Disadvantage: the sender cannot modify
the message buffer until the message
has been sent and it does not know
when the transfer can complete. It can
hardly avoid touching the buffer forever.
Blocking vs Unblocking:
Buffered vs Unbuffered:
Cont……
Reliable vs Unreliable
Primitives:
 The system has no guarantee about
message being delivered.
 The receiving machine sent an
acknowledgement back. Only when this
ack is received, will the sending kernel
free the user (client) process.
 Use reply as ack.
Cont……
Implementing the client-
server model
Item Option 1 Option 2 Option 3
Addressing Machine number Sparse process
address
ASCII names
looked up via
server
Blocking Blocking
primitives
Nonblocking with
copy to kernel
Nonblocking with
interrupt
Buffering Unbuffered,
discarding
unexpected
messages
Unbuffered,
temporarily keeping
unexpected messages
Mailboxes
Reliability Unreliable Request-Ack-Reply
Ack
Request-Reply-Ack
Code Packet
type
From To Description
REQ Request Client Server The client wants service
REP Reply Server Client Reply from the server to the
client
ACK Ack Either Other The previous packet arrived
AYA Are you
alive?
Client Server Probe to see if the server has
crashed
IAA I am alive Server Client The server has not crashed
TA Try again Server Client The server has no room
AU Address
unknown
Server Client No process is using this
address
Some examples of packet exchanges
for client-server communication:
Client Server
REQ
REP
Client Server
REQ
Client Server
REQ
ACK
REP
ACK
ACK
AYA
IAA
REP
ACK
Remote Procedure Call
 The idea behind RPC is to make a
remote procedure call look as much as
possible like a local one.
 A remote procedure call occurs in the
following steps:
Remote procedure call steps:
 The client procedure calls the client stub in the normal way.
 The client stub builds a message and traps to the kernel.
 The kernel sends the message to the remote kernel.
 The remote kernel gives the message to the server stub.
 The server stub unpacks the parameters and calls the
server.
 The server does the work and returns the result to the stub.
 The server stub packs it in a message and traps to the
kernel.
 The remote kernel sends the message to the client’s kernel.
 The client’s kernel gives the message to the client stub.
 The stub unpacks the result and returns to the client.
Remote Procedure Call:
Kernel
Client
Pack parameters
Unpack result
Call
Return
Kernel
Server
Unpack
parameters
Pack result
Call
Return
Client machine Client stub Server machineServer stub
Message transport
over the network
Parameter Passing
 little endian: bytes are numbered from
right to left
 big endian: bytes are numbered from
left to right
0 0 0 5
L L I J
3 2 1 0
7 6 5 4
5 0 0 0
J I L L
0 1 2 3
4 5 6 7
Dynamic Binding
 Server: exports the server interface.
 The server registers with a binder (a
program), that is, give the binder its
name, its version number, a unique
identifier, and a handle.
 The server can also deregister when it is
no longer prepared to offer service.
Advantages
 It can handle multiple servers that support
the same interface
 The binder can spread the clients randomly
over the servers to even the load
 It can also poll the servers periodically,
automatically deregistering any server that
fails to respond, to achieve a degree of
fault tolerance
 It can also assist in authentication.
Because a server could specify it only
wished to be used by a specific list of users
Disadvantage
 the extra overhead of exporting and
importing interfaces cost time.
Implementation Issues
 the choice of the RPC protocol:
connection-oriented or connectionless
protocol?
 general-purpose protocol or specifically
designed protocol for RPC?
 packet and message length
 Acknowledgements
Group Communication
 RPC can have one-to-one
communication (unicast) one-to-many
communication (multicast) and one-to-all
communication (broadcast).
 Multicasting can be implemented using
broadcast. Each machine receives a
message. If the message is not for this
machine, then discard.
Cont……
 Closed groups: only the member of the
group can send messages to the group.
Outsiders cannot.
 Open groups: any process in the system
can send messages to the group.
 Peer group: all the group members are
equal.
Advantage: symmetric and has no single point of failure.
Disadvantage: decision making is difficult. A vote has to be taken.
 Hierarchical group: coordinator
Advantage and disadvantage: opposite to the above
Group Membership
Management
 Centralized way: group server maintains
a complete data base of all the groups
and their exact membership.
Advantage: straightforward, efficient, and easy to implement.
Disadvantage: single point of failure.
 Distributed way: an outsider sends to
message to all group members to join
and sends a goodbye message to
everyone to leave.
Group Addressing
 A process just sends a message to a group
address and it is delivered to all the
members. The sender is not aware of the
size of the group or whether
communication is implemented by
multicasting, broadcasting, or unicasting.
 Require the sender to provide an explicit
list of all destinations (e.g., IP addresses).
 Each message contains a predicate
(Boolean expression) to be evaluated. If it
is true, accept; If false, discard.
Send and Receive
Primitives
 If we wish to merge RPC and group
communication, to send a message, one
of the parameters of send indicates the
destination. If it is a process address, a
single message is sent to that one
process. If it is a group address, a
message is sent to all members of the
group.
Atomicity
 How to guarantee atomic broadcast and
fault tolerance?
 The sender starts out by sending a message to all members
of the group. Timers are set and retransmissions sent where
necessary. When a process receives a message, if it has not
yet seen this particular message, it, too, sends the message
to all members of the group (again with times and
retransmissions if necessary). If it has already seen the
message, this step is not necessary and the message is
discarded. No matter how many machines crash or how
many packets are lost, eventually all the surviving processes
will get the message.
Message Ordering
 Use global time ordering, consistent
time ordering.
Overlapping Groups
 Overlapping groups can lead to a new
kind of inconsistency.
A
C
B
D
1
2
3
4
Group 1 Group 2
Scalability
 Many algorithms work fine as long as all
the groups only have a few members,
but what happens when there are tens,
hundreds, or even thousands of
members per group? If the algorithm still
works properly, the property is called
scalability.
Asynchronous Transfer Mode
Networks (ATM)
 When the telephone companies decided to build
networks for the 21st
century, they faced a
dilemma:
 Voice traffic is smooth, needing a low, but constant
bandwidth.
 Data traffic is bursty, needing no bandwidth (when
there is no traffic), but sometimes needing a great
deal for very short periods of time.
 Neither traditional circuit switching (used in the
Public Switched Telephone Network) nor packet
switching (used in the Internet) was suitable for
both kinds of traffic.
Cont……
 After much study, a hybrid form using
fixed-size blocks over virtual circuits was
chosen as a compromise that gave
reasonably good performance for both
types of traffic. The scheme, is called
ATM.
ATM
 The idea of ATM is that a sender first establish
a connection (i.e., a virtual circuit) to the
receiver. During connection establishment, a
route is determined from the sender to the
receiver and routing information is stored in
the switches along the way. Using this
connection, packets can be sent, but they are
chopped up into small, fixed-sized units call
cells. The cells for a given virtual circuit all
follow the path stored in the switches. When
the connection is no longer needed, it is
released and the routing information purged
from the switches.
A virtual circuit
Sender Receiver
Router
Cont……
 Advantages: now a single network can
be used to transport an arbitrary mix of
voice, data, broadcast television,
videotapes, radio, and other information
efficiently, replacing what were
previously separate networks
(telephone, X.25, cable TV, etc.).
 Video conferencing can use ATM.
ATM reference model
Physical layer
ATM layer
Adaptation layer
Upper layers
Cont……
 The ATM physical layer has the same
functionality as layer 1 in the OSI model.
 The ATM layer deals with cells and cell
transport, including routing.
 The adaptation layer handles breaking
packets into cells and reassembling them
at the other end.
 The upper layer makes it possible to have
ATM offer different kinds of services to
different applications.
An ATM cell
Bytes
Header User data
5 48
2.communcation in distributed system

Más contenido relacionado

La actualidad más candente

8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating SystemsDr Sandeep Kumar Poonia
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and modelsMayank Jain
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corbaMayuresh Wadekar
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software conceptsPrajakta Rane
 
Chapter 14 replication
Chapter 14 replicationChapter 14 replication
Chapter 14 replicationAbDul ThaYyal
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionSHIKHA GAUTAM
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed SystemsPritom Saha Akash
 
Corba concepts & corba architecture
Corba concepts & corba architectureCorba concepts & corba architecture
Corba concepts & corba architecturenupurmakhija1211
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computingSVijaylakshmi
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency ControlDilum Bandara
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architectureAbDul ThaYyal
 

La actualidad más candente (20)

8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and models
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
models of distributed computing
models of distributed computingmodels of distributed computing
models of distributed computing
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
 
Shoaib
ShoaibShoaib
Shoaib
 
2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts2. Distributed Systems Hardware & Software concepts
2. Distributed Systems Hardware & Software concepts
 
Chapter 14 replication
Chapter 14 replicationChapter 14 replication
Chapter 14 replication
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock Detection
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed Systems
 
Distributed Systems Naming
Distributed Systems NamingDistributed Systems Naming
Distributed Systems Naming
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
IEEE 802.11
IEEE 802.11IEEE 802.11
IEEE 802.11
 
Socket System Calls
Socket System CallsSocket System Calls
Socket System Calls
 
Corba concepts & corba architecture
Corba concepts & corba architectureCorba concepts & corba architecture
Corba concepts & corba architecture
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
 
Synchronization in distributed computing
Synchronization in distributed computingSynchronization in distributed computing
Synchronization in distributed computing
 
Transactions and Concurrency Control
Transactions and Concurrency ControlTransactions and Concurrency Control
Transactions and Concurrency Control
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architecture
 

Similar a 2.communcation in distributed system

Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3farshad33
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2DBU
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.pptsirajmohammed35
 
group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressingAnitha Selvan
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...Sehrish Asif
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02dvicky12
 
lecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for anslecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for anspeterhaile1
 
Question 1The OSI model has seven layers where each layer pe.docx
Question 1The OSI model has seven layers where each layer pe.docxQuestion 1The OSI model has seven layers where each layer pe.docx
Question 1The OSI model has seven layers where each layer pe.docxssuser774ad41
 

Similar a 2.communcation in distributed system (20)

Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.ppt
 
group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressing
 
Lecture9
Lecture9Lecture9
Lecture9
 
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...Message Passing, Remote Procedure Calls and  Distributed Shared Memory as Com...
Message Passing, Remote Procedure Calls and Distributed Shared Memory as Com...
 
Ch 2 network
Ch 2 networkCh 2 network
Ch 2 network
 
Tcp ip
Tcp ipTcp ip
Tcp ip
 
NP-lab-manual.docx
NP-lab-manual.docxNP-lab-manual.docx
NP-lab-manual.docx
 
Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02Intranet Messaging Project Report -phpapp02
Intranet Messaging Project Report -phpapp02
 
NP-lab-manual (1).pdf
NP-lab-manual (1).pdfNP-lab-manual (1).pdf
NP-lab-manual (1).pdf
 
NP-lab-manual.pdf
NP-lab-manual.pdfNP-lab-manual.pdf
NP-lab-manual.pdf
 
Chapter4 Network
Chapter4 NetworkChapter4 Network
Chapter4 Network
 
Unit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part AUnit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part A
 
Unit 2
Unit 2Unit 2
Unit 2
 
DLL
DLLDLL
DLL
 
lecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for anslecture note 2023 up10 stud2.ppt for ans
lecture note 2023 up10 stud2.ppt for ans
 
Question 1The OSI model has seven layers where each layer pe.docx
Question 1The OSI model has seven layers where each layer pe.docxQuestion 1The OSI model has seven layers where each layer pe.docx
Question 1The OSI model has seven layers where each layer pe.docx
 

Último

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 

Último (20)

Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 

2.communcation in distributed system

  • 2. D/F b/w ds and uniprocessor:  The single most important difference between a distributed system and a uniprocessor system is the interprocess communication.
  • 3. OSI (Open System Interconnection Reference model) Presentation Session Data link Network Physical Transport Interface Process A Machine 1 Presentation Sessionn Data link Network Physical Transport Interface Process B Machine 2 Network Application protocol Presentation protocol Session protocol Transport protocol Network protocol Application Application Data link protocol Physical protocol
  • 4. The physical layer  This layer transmits the 0s and 1s. For example:  How many volts to use for 0 and 1  How many bits per second can be sent  Whether transmission can take place in both directions simultaneously  The size and shape of the network connector  The number of pins and meaning of each one  It is physical layer’s job to make sure: send 0---receive 0 not 1.
  • 5. The data link layer  This layer is to detect and correct errors in the physical layer. It groups the bits into frames, and see that each frame is correctly received.  The data link layer does its work by putting a special bit pattern on the start and end of each frame, to mark them, as well as computing a checksum by adding up all the bytes in the frame in a certain way.
  • 6. The network layer  The primary task of this layer is routing, that is, how to choose the best path to send the message to the destination.  The shortest route is not always the best route. What really matters is the amount of delay on a given route. Delay can change over the course of time.  Two network-layer protocols:  1) X.25 (telephone network) connection- oriented  2) IP (Internet protocol) connectionless
  • 7. The transport layer  This layer is to deliver a message to the transport layer with the expectation that it will be delivered without loss.  Upon receiving a message from the session layer : • The transport layer breaks it into pieces small enough for each to fit in a single packet • Assign each one a sequence number • Send them all  E.g. TCP, UDP
  • 8. The session layer  This layer is essentially an enhanced version of the transport layer.  Provides dialog control, to keep track of which party is currently talking  Few applications are interested in this and it is rarely supported.
  • 9. Presentation Layer  This layer is concerned with the meaning of bits.  E.g. people’s names, addresses, amounts of money, and so on.
  • 10. The Application Layer  This layer is a collection of miscellaneous protocols for common activities such as electronic mail, file transfer, and connecting remote terminals to computers over a network.
  • 12. Client-Server Model Layer Request/Reply Data link Physical1 2 3 4 5 6 7
  • 13. Advantages  Simplicity: The client sends a request and gets an answer. No connection has to be established.  Efficiency: just 3 layers. Getting packets from client to server and back is handled by 1 and 2 by hardware: an Ethernet or Token ring. No routing is needed and no connections are established, so layers 3 and 4 are not needed. Layer 5 defines the set of legal requests and replies to these requests.  two system calls: send (dest, &mptr), receive (addr, &mptr)
  • 14. Addressing  1.the server’s address was simply hardwired as a constant  2.Machine # + Process #: 243.4 199.0  3.Machine # + local-id  Disadvantage: it is not transparent to the user. If the server is changed from 243 to 170, the program has to be changed.
  • 15. Cont……  4. Assign each process a unique address that does not contain an embedded machine number. .  Disadvantage: centralize does not scale to large systems.
  • 16. Cont……  5. Let each process pick its own id from a large address space, such as the space of 64-bit binary integers.  Disadvantage: broadcasting puts extra load on the system.
  • 17. Cont……  6. provide an extra machine to map high-level (ASCII) service names to machine addresses. Servers can be referred to by ASCII strings in the program.  Disadvantage: centralized component: the name server
  • 18. Cont……  7. Use special hardware. Let process pick random address. Instead of locating them by broadcasting, locate them by hardware.
  • 19. Blocking versus Nonblocking Primitives : Client running Trap to kernel, Process blocked Client running Return from kernel, process released Client blocked Message being sent Blocking send primitive
  • 20. Nonblocking send primitive: Client running Trap Client running Client blocked Return Message copied to kernel buffer Message being sent
  • 21. Nonblocking primitives:  Advantage: can continue execution without waiting.  Disadvantage: the sender cannot modify the message buffer until the message has been sent and it does not know when the transfer can complete. It can hardly avoid touching the buffer forever.
  • 25. Reliable vs Unreliable Primitives:  The system has no guarantee about message being delivered.  The receiving machine sent an acknowledgement back. Only when this ack is received, will the sending kernel free the user (client) process.  Use reply as ack.
  • 27. Implementing the client- server model Item Option 1 Option 2 Option 3 Addressing Machine number Sparse process address ASCII names looked up via server Blocking Blocking primitives Nonblocking with copy to kernel Nonblocking with interrupt Buffering Unbuffered, discarding unexpected messages Unbuffered, temporarily keeping unexpected messages Mailboxes Reliability Unreliable Request-Ack-Reply Ack Request-Reply-Ack
  • 28. Code Packet type From To Description REQ Request Client Server The client wants service REP Reply Server Client Reply from the server to the client ACK Ack Either Other The previous packet arrived AYA Are you alive? Client Server Probe to see if the server has crashed IAA I am alive Server Client The server has not crashed TA Try again Server Client The server has no room AU Address unknown Server Client No process is using this address
  • 29. Some examples of packet exchanges for client-server communication: Client Server REQ REP Client Server REQ Client Server REQ ACK REP ACK ACK AYA IAA REP ACK
  • 30. Remote Procedure Call  The idea behind RPC is to make a remote procedure call look as much as possible like a local one.  A remote procedure call occurs in the following steps:
  • 31. Remote procedure call steps:  The client procedure calls the client stub in the normal way.  The client stub builds a message and traps to the kernel.  The kernel sends the message to the remote kernel.  The remote kernel gives the message to the server stub.  The server stub unpacks the parameters and calls the server.  The server does the work and returns the result to the stub.  The server stub packs it in a message and traps to the kernel.  The remote kernel sends the message to the client’s kernel.  The client’s kernel gives the message to the client stub.  The stub unpacks the result and returns to the client.
  • 32. Remote Procedure Call: Kernel Client Pack parameters Unpack result Call Return Kernel Server Unpack parameters Pack result Call Return Client machine Client stub Server machineServer stub Message transport over the network
  • 33. Parameter Passing  little endian: bytes are numbered from right to left  big endian: bytes are numbered from left to right 0 0 0 5 L L I J 3 2 1 0 7 6 5 4 5 0 0 0 J I L L 0 1 2 3 4 5 6 7
  • 34. Dynamic Binding  Server: exports the server interface.  The server registers with a binder (a program), that is, give the binder its name, its version number, a unique identifier, and a handle.  The server can also deregister when it is no longer prepared to offer service.
  • 35. Advantages  It can handle multiple servers that support the same interface  The binder can spread the clients randomly over the servers to even the load  It can also poll the servers periodically, automatically deregistering any server that fails to respond, to achieve a degree of fault tolerance  It can also assist in authentication. Because a server could specify it only wished to be used by a specific list of users
  • 36. Disadvantage  the extra overhead of exporting and importing interfaces cost time.
  • 37. Implementation Issues  the choice of the RPC protocol: connection-oriented or connectionless protocol?  general-purpose protocol or specifically designed protocol for RPC?  packet and message length  Acknowledgements
  • 38. Group Communication  RPC can have one-to-one communication (unicast) one-to-many communication (multicast) and one-to-all communication (broadcast).  Multicasting can be implemented using broadcast. Each machine receives a message. If the message is not for this machine, then discard.
  • 39. Cont……  Closed groups: only the member of the group can send messages to the group. Outsiders cannot.  Open groups: any process in the system can send messages to the group.  Peer group: all the group members are equal. Advantage: symmetric and has no single point of failure. Disadvantage: decision making is difficult. A vote has to be taken.  Hierarchical group: coordinator Advantage and disadvantage: opposite to the above
  • 40. Group Membership Management  Centralized way: group server maintains a complete data base of all the groups and their exact membership. Advantage: straightforward, efficient, and easy to implement. Disadvantage: single point of failure.  Distributed way: an outsider sends to message to all group members to join and sends a goodbye message to everyone to leave.
  • 41. Group Addressing  A process just sends a message to a group address and it is delivered to all the members. The sender is not aware of the size of the group or whether communication is implemented by multicasting, broadcasting, or unicasting.  Require the sender to provide an explicit list of all destinations (e.g., IP addresses).  Each message contains a predicate (Boolean expression) to be evaluated. If it is true, accept; If false, discard.
  • 42. Send and Receive Primitives  If we wish to merge RPC and group communication, to send a message, one of the parameters of send indicates the destination. If it is a process address, a single message is sent to that one process. If it is a group address, a message is sent to all members of the group.
  • 43. Atomicity  How to guarantee atomic broadcast and fault tolerance?  The sender starts out by sending a message to all members of the group. Timers are set and retransmissions sent where necessary. When a process receives a message, if it has not yet seen this particular message, it, too, sends the message to all members of the group (again with times and retransmissions if necessary). If it has already seen the message, this step is not necessary and the message is discarded. No matter how many machines crash or how many packets are lost, eventually all the surviving processes will get the message.
  • 44. Message Ordering  Use global time ordering, consistent time ordering.
  • 45. Overlapping Groups  Overlapping groups can lead to a new kind of inconsistency. A C B D 1 2 3 4 Group 1 Group 2
  • 46. Scalability  Many algorithms work fine as long as all the groups only have a few members, but what happens when there are tens, hundreds, or even thousands of members per group? If the algorithm still works properly, the property is called scalability.
  • 47. Asynchronous Transfer Mode Networks (ATM)  When the telephone companies decided to build networks for the 21st century, they faced a dilemma:  Voice traffic is smooth, needing a low, but constant bandwidth.  Data traffic is bursty, needing no bandwidth (when there is no traffic), but sometimes needing a great deal for very short periods of time.  Neither traditional circuit switching (used in the Public Switched Telephone Network) nor packet switching (used in the Internet) was suitable for both kinds of traffic.
  • 48. Cont……  After much study, a hybrid form using fixed-size blocks over virtual circuits was chosen as a compromise that gave reasonably good performance for both types of traffic. The scheme, is called ATM.
  • 49. ATM  The idea of ATM is that a sender first establish a connection (i.e., a virtual circuit) to the receiver. During connection establishment, a route is determined from the sender to the receiver and routing information is stored in the switches along the way. Using this connection, packets can be sent, but they are chopped up into small, fixed-sized units call cells. The cells for a given virtual circuit all follow the path stored in the switches. When the connection is no longer needed, it is released and the routing information purged from the switches.
  • 50. A virtual circuit Sender Receiver Router
  • 51. Cont……  Advantages: now a single network can be used to transport an arbitrary mix of voice, data, broadcast television, videotapes, radio, and other information efficiently, replacing what were previously separate networks (telephone, X.25, cable TV, etc.).  Video conferencing can use ATM.
  • 52. ATM reference model Physical layer ATM layer Adaptation layer Upper layers
  • 53. Cont……  The ATM physical layer has the same functionality as layer 1 in the OSI model.  The ATM layer deals with cells and cell transport, including routing.  The adaptation layer handles breaking packets into cells and reassembling them at the other end.  The upper layer makes it possible to have ATM offer different kinds of services to different applications.
  • 54. An ATM cell Bytes Header User data 5 48

Notas del editor

  1. Problem: how does the sending kernel know what machine to send the message to? Solution: a.The sender can broadcast a special “locate packet” containing the address of the destination process. b. All the kernel check to see if the address is theirs. c. If so, send back “here I am” message giving their network address (machine number).