SlideShare a Scribd company logo
1 of 11
Download to read offline
Message Passing
    Channels
Message Passing

qCommunication links can be established
 between threads/processes. There are three
 important issues:
qNaming: How to refer to each other?
qSynchronization: Shall we wait when
 participating a message activity?
qBuffering: Can message wait in a
 communication link?
Naming: Direct Communication
       Symmetric Scheme
qDirect Communication: Each process that wants to
 communicate must explicitly name the other party:
  vSend(receiver, message);
  vReceive(sender, message);
qWith this scheme:
  vA link is established between exactly two processes.
  vExactly one link exists between each pair of
   processes.
  vWe may establish these links for those processes
   that want to communicate before they run
Naming: Direct Communication
    Asymmetric Scheme
qIn this scheme, we have
  vSend(receiver, message);
  vReceive(id, message);
qThe Receive() primitive receives the ID of
 the sender. Thus, in this scheme, a receiver can
 receive message from any process.
Naming: Direct Communication

 qThere are disadvantages in this symmetric and
  asymmetric schemes:
   vChanging the name/ID of a process may
    require examining all other process
    definitions.
   vProcesses must know the IDs of the other
    parties to start a communication.
Naming: Indirect Communication
 qWith indirect communication, the messages are
  sent to and received from mailboxes or ports.
 qEach mailbox has a unique ID.
 qThe primitives are
   vSend(mailbox-name, message);
   vReceive(mailbox-name,message);
 qThus, messages are sent to and received from
  mailboxes.
Naming: Indirect Communication
    Communication Links
qThere is a link between two processes only if
 they share a mailbox.
qA link may be shared by multiple processes.
qMultiple links may exist between each pair of
 processes, with each link corresponding to a
 mailbox.
Naming: Indirect Communication
    Communication Links
 qWhat if there is only one message in a mailbox
  and two processes execute Receive()? It
  depends on the following:
   vOnly one link between at most two processes
   vAllow at most one process to receive at a
    time
   vAllow the system to select an arbitrary order
Synchronization
qThe sender and receiver may be blocked:
  vBlocking Send: the sender blocks until its
    message is received
  vNonblocking Send: the sender sends and
    resumes its execution
  vBlocking Receive: the receiver blocks until a
    message is available
  vNonblocking Receive: the receive receives a
    message or a null.
qWhen both send and receive are blocking, we
 have a rendezvous between the sender and
 receiver.
Synchronous vs. Asynchronous
qBlocking and non-blocking are known as
 synchronous and asynchronous.
  vIf the sender and receiver must synchronize
   their activities, use synchronous communication.
  vBecause the uncertainty in the order of events,
   asynchronous communication is more difficult
   to program.
  vOn the other hand, asynchronous algorithms
   are general and portable, because they are
   guaranteed to run correctly in networks with
   arbitrary timing behavior.
Capacity
qThe capacity of a communication link is its buffer
 size:
  vZero Capacity: Since no message can be waiting
    in the link, it is synchronous. Sender may block
  vUnbounded Capacity: Messages can wait in the
    link. Sender never blocks and the link is
    asynchronous. The order of messages being
    received does not have to be FIFO.
  vBounded Capacity: Buffered Message Passing.
    Sender blocks if the buffer is full, and the link is
    asynchronous.

More Related Content

Viewers also liked

Operating system structures
Operating system structuresOperating system structures
Operating system structuresMohd Arif
 
Os structure
Os structureOs structure
Os structureMohd Arif
 
Theories of Inflation
Theories of InflationTheories of Inflation
Theories of InflationSoumya S Nair
 
File management
File managementFile management
File managementMohd Arif
 
Intro to Deadlocks
Intro to DeadlocksIntro to Deadlocks
Intro to Deadlockslionpeal
 
Operating systems Overview
Operating systems OverviewOperating systems Overview
Operating systems OverviewNAILBITER
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)Vaibhav Bajaj
 
Functions Of Operating System
Functions Of Operating SystemFunctions Of Operating System
Functions Of Operating SystemDr.Suresh Isave
 
Operating System Deadlock Galvin
Operating System  Deadlock GalvinOperating System  Deadlock Galvin
Operating System Deadlock GalvinSonali Chauhan
 

Viewers also liked (19)

Io sys
Io sysIo sys
Io sys
 
Operating system
Operating systemOperating system
Operating system
 
Deadlock
DeadlockDeadlock
Deadlock
 
Operating system structures
Operating system structuresOperating system structures
Operating system structures
 
Process
ProcessProcess
Process
 
File system
File systemFile system
File system
 
Os structure
Os structureOs structure
Os structure
 
Theories of Inflation
Theories of InflationTheories of Inflation
Theories of Inflation
 
File management
File managementFile management
File management
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Intro to Deadlocks
Intro to DeadlocksIntro to Deadlocks
Intro to Deadlocks
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Operating system
Operating systemOperating system
Operating system
 
Operating systems Overview
Operating systems OverviewOperating systems Overview
Operating systems Overview
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating system
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
 
Functions Of Operating System
Functions Of Operating SystemFunctions Of Operating System
Functions Of Operating System
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
Operating System Deadlock Galvin
Operating System  Deadlock GalvinOperating System  Deadlock Galvin
Operating System Deadlock Galvin
 

Similar to Channel

Inter process communication
Inter process communicationInter process communication
Inter process communicationGowriLatha1
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Dhivyaa C.R
 
Transport_Layer (1).pptx
Transport_Layer (1).pptxTransport_Layer (1).pptx
Transport_Layer (1).pptxSAICHARANREDDYN
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
connectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdfconnectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdfImXaib
 
5_Interprocess Communication.pptx
5_Interprocess Communication.pptx5_Interprocess Communication.pptx
5_Interprocess Communication.pptxssuser2adefd1
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct doxBaig Mirza
 
Protocols and standards
Protocols and standardsProtocols and standards
Protocols and standardsPriyankaM69
 
Bt0072, computer networks
Bt0072, computer networksBt0072, computer networks
Bt0072, computer networkssmumbahelp
 
Message Queue (MQ) Testing
Message Queue (MQ) TestingMessage Queue (MQ) Testing
Message Queue (MQ) TestingUjjwal Gupta
 
System modeling and simulations
System modeling and simulationsSystem modeling and simulations
System modeling and simulationsSeydi Alkan
 
What are the types of channels
What are the types of channelsWhat are the types of channels
What are the types of channelsSindhu Ragunathan
 
What are the types of channels
What are the types of channelsWhat are the types of channels
What are the types of channelsSindhu Ragunathan
 
CN R16 -UNIT-6.pdf
CN R16 -UNIT-6.pdfCN R16 -UNIT-6.pdf
CN R16 -UNIT-6.pdfJoshuaeeda1
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01Zaigham Abbas
 

Similar to Channel (20)

Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
 
Dos unit 2
Dos unit 2Dos unit 2
Dos unit 2
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Transport_Layer (1).pptx
Transport_Layer (1).pptxTransport_Layer (1).pptx
Transport_Layer (1).pptx
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
connectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdfconnectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdf
 
5_Interprocess Communication.pptx
5_Interprocess Communication.pptx5_Interprocess Communication.pptx
5_Interprocess Communication.pptx
 
Arun prjct dox
Arun prjct doxArun prjct dox
Arun prjct dox
 
Protocols and standards
Protocols and standardsProtocols and standards
Protocols and standards
 
Bt0072, computer networks
Bt0072, computer networksBt0072, computer networks
Bt0072, computer networks
 
Message Queue (MQ) Testing
Message Queue (MQ) TestingMessage Queue (MQ) Testing
Message Queue (MQ) Testing
 
System modeling and simulations
System modeling and simulationsSystem modeling and simulations
System modeling and simulations
 
8 Packet Switching
8 Packet Switching8 Packet Switching
8 Packet Switching
 
What are the types of channels
What are the types of channelsWhat are the types of channels
What are the types of channels
 
What are the types of channels
What are the types of channelsWhat are the types of channels
What are the types of channels
 
2nd
2nd2nd
2nd
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
CN R16 -UNIT-6.pdf
CN R16 -UNIT-6.pdfCN R16 -UNIT-6.pdf
CN R16 -UNIT-6.pdf
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
 

More from Mohd Arif

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcpMohd Arif
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarpMohd Arif
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolMohd Arif
 
Project identification
Project identificationProject identification
Project identificationMohd Arif
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniquesMohd Arif
 
Presentation
PresentationPresentation
PresentationMohd Arif
 
Pointers in c
Pointers in cPointers in c
Pointers in cMohd Arif
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peerMohd Arif
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systemsMohd Arif
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdpMohd Arif
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgetingMohd Arif
 
Network management
Network managementNetwork management
Network managementMohd Arif
 
Networing basics
Networing basicsNetworing basics
Networing basicsMohd Arif
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformMohd Arif
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and sslMohd Arif
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psecMohd Arif
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardwareMohd Arif
 

More from Mohd Arif (20)

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcp
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
Project identification
Project identificationProject identification
Project identification
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniques
 
Presentation
PresentationPresentation
Presentation
 
Pointers in c
Pointers in cPointers in c
Pointers in c
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peer
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systems
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdp
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgeting
 
Network management
Network managementNetwork management
Network management
 
Networing basics
Networing basicsNetworing basics
Networing basics
 
Loaders
LoadersLoaders
Loaders
 
Lists
ListsLists
Lists
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platform
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and ssl
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psec
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardware
 
Heap sort
Heap sortHeap sort
Heap sort
 

Recently uploaded

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Channel

  • 1. Message Passing Channels
  • 2. Message Passing qCommunication links can be established between threads/processes. There are three important issues: qNaming: How to refer to each other? qSynchronization: Shall we wait when participating a message activity? qBuffering: Can message wait in a communication link?
  • 3. Naming: Direct Communication Symmetric Scheme qDirect Communication: Each process that wants to communicate must explicitly name the other party: vSend(receiver, message); vReceive(sender, message); qWith this scheme: vA link is established between exactly two processes. vExactly one link exists between each pair of processes. vWe may establish these links for those processes that want to communicate before they run
  • 4. Naming: Direct Communication Asymmetric Scheme qIn this scheme, we have vSend(receiver, message); vReceive(id, message); qThe Receive() primitive receives the ID of the sender. Thus, in this scheme, a receiver can receive message from any process.
  • 5. Naming: Direct Communication qThere are disadvantages in this symmetric and asymmetric schemes: vChanging the name/ID of a process may require examining all other process definitions. vProcesses must know the IDs of the other parties to start a communication.
  • 6. Naming: Indirect Communication qWith indirect communication, the messages are sent to and received from mailboxes or ports. qEach mailbox has a unique ID. qThe primitives are vSend(mailbox-name, message); vReceive(mailbox-name,message); qThus, messages are sent to and received from mailboxes.
  • 7. Naming: Indirect Communication Communication Links qThere is a link between two processes only if they share a mailbox. qA link may be shared by multiple processes. qMultiple links may exist between each pair of processes, with each link corresponding to a mailbox.
  • 8. Naming: Indirect Communication Communication Links qWhat if there is only one message in a mailbox and two processes execute Receive()? It depends on the following: vOnly one link between at most two processes vAllow at most one process to receive at a time vAllow the system to select an arbitrary order
  • 9. Synchronization qThe sender and receiver may be blocked: vBlocking Send: the sender blocks until its message is received vNonblocking Send: the sender sends and resumes its execution vBlocking Receive: the receiver blocks until a message is available vNonblocking Receive: the receive receives a message or a null. qWhen both send and receive are blocking, we have a rendezvous between the sender and receiver.
  • 10. Synchronous vs. Asynchronous qBlocking and non-blocking are known as synchronous and asynchronous. vIf the sender and receiver must synchronize their activities, use synchronous communication. vBecause the uncertainty in the order of events, asynchronous communication is more difficult to program. vOn the other hand, asynchronous algorithms are general and portable, because they are guaranteed to run correctly in networks with arbitrary timing behavior.
  • 11. Capacity qThe capacity of a communication link is its buffer size: vZero Capacity: Since no message can be waiting in the link, it is synchronous. Sender may block vUnbounded Capacity: Messages can wait in the link. Sender never blocks and the link is asynchronous. The order of messages being received does not have to be FIFO. vBounded Capacity: Buffered Message Passing. Sender blocks if the buffer is full, and the link is asynchronous.