Message Passing Systems (Part 1)
Summary
TLDRThis lecture delves into message passing systems, a type of inter-process communication that enables processes to exchange messages without sharing memory. It's particularly beneficial for distributed environments, such as internet chat, where processes on different systems communicate via networks. The lecture explains the basic operations of sending and receiving messages, discusses fixed and variable message sizes, and touches on the complexities of system implementation. It also introduces various methods for logically implementing communication links and the associated challenges.
Takeaways
- ๐ The lecture focuses on message passing systems as a form of inter-process communication (IPC), contrasting with shared memory systems.
- ๐ Message passing is particularly useful in distributed environments where processes may reside on different computers connected by a network.
- ๐ฌ In message passing systems, processes communicate and synchronize without sharing the same address space, unlike shared memory systems.
- ๐ The system provides two fundamental operations: 'send message' and 'receive message' for processes to communicate with each other.
- ๐ฆ Messages can be of fixed or variable length, with fixed size making system implementation easier but programming more challenging, and vice versa for variable size.
- ๐ ๏ธ Fixed size messages simplify system-level implementation but complicate programming due to the restriction on message size.
- ๐ Variable size messages require a more complex system implementation but simplify programming by allowing flexibility in message size.
- ๐ For processes to communicate, a communication link must exist between them, which can be implemented in various logical ways.
- ๐ The lecture will cover methods for logically implementing communication links and the associated issues like naming, synchronization, and buffering in the second part.
- ๐ค The script introduces the concept of message passing systems and sets the stage for a deeper dive into its features and operation mechanisms.
- ๐ The lecture aims to clarify the workings of message passing systems for students, providing foundational knowledge for further study.
Q & A
What is the main difference between shared memory systems and message passing systems in inter-process communication?
-Shared memory systems allow processes to communicate by sharing a portion of memory within the address space of one process, whereas message passing systems enable communication between processes without sharing the same address space, which is especially useful in distributed environments.
Why are message passing systems particularly useful in a distributed environment?
-Message passing systems are useful in distributed environments because they allow processes on different computers, connected by a network, to communicate by sending and receiving messages without the need for a shared memory region that can be accessed by both processes.
What are the two basic operations provided by a message passing facility?
-The two basic operations provided by a message passing facility are 'send message', which allows a process to send a message to another process, and 'receive message', which allows the recipient process to receive the message from the sender.
What are the two types of message sizes that can be sent in a message passing system?
-The two types of message sizes are fixed size and variable size. Fixed size messages have a predetermined size that cannot be exceeded, while variable size messages can vary in size, being either large or small.
How does the implementation of fixed size messages affect the system level and the task of programming?
-Fixed size message implementation is straightforward at the system level because the system is designed to handle messages of a fixed size. However, it makes programming more difficult because programmers must ensure that the messages do not exceed the fixed size, which can be restrictive.
What is the advantage of variable size messages in terms of programming ease?
-Variable size messages require a more complex system level implementation but offer the advantage of simplifying the programming task. Programmers do not have restrictions on the size of the messages, making it easier to handle communication between processes with messages of varying sizes.
What is a communication link in the context of message passing systems?
-A communication link in message passing systems is a logical connection between two processes that allows them to send and receive messages. It is necessary for processes to communicate with each other in the absence of shared memory.
What are some of the methods for logically implementing a communication link between processes in a message passing system?
-Some methods for logically implementing a communication link include direct or indirect communication, synchronous or asynchronous communication, and automatic or explicit buffering.
What are some of the issues associated with features like naming, synchronization, and buffering in message passing systems?
-Issues associated with features like naming, synchronization, and buffering involve how processes identify each other (naming), how they coordinate message sending and receiving (synchronization), and how messages are stored temporarily before being sent or after being received (buffering).
How does the message passing system facilitate communication between two processes, P and Q?
-For processes P and Q to communicate using a message passing system, they must be able to send and receive messages from each other. This requires a communication link between them, which can be implemented in various ways as discussed in the lecture.
What will be discussed in the second part of the lecture on message passing systems?
-The second part of the lecture will delve into the methods for logically implementing a communication link and the issues associated with features such as naming, synchronization, and buffering in message passing systems.
Outlines
๐ Introduction to Message Passing Systems
This paragraph introduces the concept of message passing systems as a method of inter-process communication, contrasting it with shared memory systems. It explains that message passing allows processes to communicate and synchronize without sharing the same address space, which is particularly beneficial in distributed environments like internet chat. The paragraph also outlines the basic operations of send and receive messages, which are fundamental to message passing facilities, and touches on the differences between fixed and variable length messages in terms of system implementation and programming complexity.
๐ Fixed vs. Variable Message Sizes in Message Passing
The second paragraph delves into the specifics of fixed and variable size messages within message passing systems. It discusses how fixed size messages simplify system-level implementation but complicate programming due to the inflexibility in message size. Conversely, variable size messages demand a more complex system implementation but ease the programming process by removing size restrictions. The paragraph also emphasizes the importance of a communication link between processes for message passing and hints at various methods for logically implementing such links, which will be detailed in a subsequent lecture.
๐ Upcoming Discussion on Link Implementation and Communication Features
The final paragraph sets the stage for the second part of the lecture, where the focus will be on the methods for logically implementing communication links and addressing associated issues such as naming, synchronization, and buffering. It provides a brief overview of the topics to be covered and assures the audience that these aspects of message passing systems will be thoroughly explained in the continuation of the lecture series.
Mindmap
Keywords
๐กMessage Passing Systems
๐กInter-Process Communication (IPC)
๐กShared Memory Systems
๐กDistributed Environment
๐กSend Message Operation
๐กReceive Message Operation
๐กFixed Size Messages
๐กVariable Size Messages
๐กCommunication Link
๐กDirect Communication
๐กSynchronous Communication
Highlights
Introduction to message passing systems as a type of inter-process communication.
Comparison with shared memory systems where communication occurs through shared regions of memory.
Message passing systems work without sharing the same address space, beneficial in distributed environments.
Usefulness of message passing in scenarios like internet chat where processes are on different systems.
Basic operations of message passing systems: send message and receive message.
Message sizes can be fixed or variable, impacting system implementation and programming complexity.
Fixed size messages simplify system implementation but complicate programming due to size restrictions.
Variable size messages require complex system implementation but ease programming tasks.
The necessity of a communication link between processes for message passing.
Several methods for logically implementing a communication link for message passing.
Different methods include direct or indirect communication, synchronous or asynchronous messaging.
Automatic or explicit buffering as a method for message passing system implementation.
Issues related to naming, synchronization, and buffering in message passing systems.
The importance of addressing these issues for effective communication between processes.
The lecture will continue to explore methods and issues in the second part, indicating a comprehensive coverage.
Practical applications of message passing systems in modern distributed computing environments.
The theoretical underpinnings of message passing systems and their significance in computer science.
Transcripts
in this lecture we'll be studying about
message passing systems in the previous
lecture we have studied about another
kind of inter-process communication
which was a shared memory systems in
which if two process wants to
communicate they do so by sharing a
portion of memory which resides in the
address space of one of the processes
and when they want to communicate they
write to that shared memory or they read
from that shared memory now we'll be
discussing the next kind of
inter-process communication which is the
message passing systems so we have seen
a brief introduction about this message
passing systems when we discussed the
lecture of inter-process communication
but in this lecture we'll be studying in
more detail about this message passing
system and how this message passing
systems actually work
so message passing provides a mechanism
to allow processes to communicate and to
synchronize their actions without
sharing the same address space
and is particularly useful in a
distributed environment
where the communicating processes may
reside on different computers connected
by a network so as i already told you
when we discuss about shared memory
system we saw that the communication
took place by sharing a region of memory
between the two processes but in this
message passing system we are not going
to share any region of memory but we are
going to have a communication between
two or more processes without sharing
any address space
and why is this useful this is useful in
a distributed environment so for example
let's say that the processes that wants
to communicate they lie within the same
system suppose two processes within the
same system wants to communicate then it
is easy for them to create a shared
region of memory which is a shared
memory and they can communicate using
that shared region of memory so as we
already studied the shared memory it
lies in the address space of one of the
processes and both the processes that
wants to communicate needs to be able to
access that region of shared memory but
think of a scenario in which you have a
distributed environment or a
communication process that resides on
computers connected by a network so for
this let us take the example of internet
chat so let's say that you are chatting
with your friend over the internet so
you are sending message from your system
and your friend is receiving the
message in his system that is located
somewhere else
so even in this place the two processes
needs to communicate your process from
your system and the process in your
friend system also needs to communicate
but they are not residing in the same
system but they are residing in
different systems connected through a
network so in this scenario it is
difficult to create a region of shared
memory that can be accessed by these two
processes so in this kind of scenario
message passing system can be used where
the communicating processes will
communicate via some kind of messages
which will be sent from one process to
another process so in this way they
don't need to have a region of shared
memory but they can send messages to
another process and also it can receive
messages from other processes so that is
how message passing systems work so
we'll go into the details of message
passing systems and we will see what are
his features and how does this message
passing system actually work so the
message passing facility provides at
least two operations which are send
message and receive message so these are
the two operations provided by a message
passing facility the first one is send
message so from the name itself it is
understood that send message is the
operation that allows the process to
send the message to the other process to
which it wants to communicate and then
we have the receive message operation so
the receive message operation
is the operation which allows the
process which is the recipient of the
message to receive the message from the
other process that is sending the
message
so these are the two operations that we
have in a message passing facility and
then
message sent by a process can be of
either fixed or variable length so when
the message is being sent from one
process to another process
the length of the message or the size of
the message can be either of fixed size
or variable size so fixed size means the
message will have a particular size that
will be fixed and it cannot exceed that
size and variable size means the size of
the message can vary it can be big or it
can be small so let us see what are the
features of these fixed size messages
and variables as messages and how easy
is it to implement these two kind of
message sizes so in fixed size the
system level implementation is
straightforward
but
makes the task of programming more
difficult now why do we say this in
fixed size it says that the system level
implementation is straightforward it
says so because if you are going to
implement a fixed size system the system
level implementation is easy or it is
not very difficult because when you are
designing your system you have to design
your system in such a way that the
length of the messages that will be sent
by the processes will be of fixed size
so in that way the implementation is
straightforward so the system level
implementation that means the way in
which the system is implemented is
straightforward and easy because you
just have to maintain a fixed size
but it makes a task of programming more
difficult now the task of programming
becomes more difficult now what is the
task of programming so when you are
programming you may have to control the
way in which the messages are sent from
one process to another but you have to
always keep in mind that the size of the
message should be fixed you cannot vary
your
size of the message so sometimes when
you are programming you may want to have
messages of larger sizes but it is not
possible because we are only allowed to
have messages of fixed size so that is
why it says the task of programming
becomes more difficult in this fixed
size method now coming to the variable
size it requires a more complex system
level implementation but the programming
task becomes simpler so in case of
variable size messages it requires a
more complex system level implementation
which means that when you are designing
the system it may be a little more
complex or it may be a little more
difficult because you have to allow the
messages to be of any size or variable
size the size should be allowed to vary
so when you are designing something of
that form the messages should be allowed
to take any size they may be bigger size
or smaller size and it must be versatile
in that way so the system level
implementation becomes more complex but
the programming task becomes simpler but
in this case the programming task
becomes simpler because when you are
programming it is easy for you because
you are not having a restriction on the
size of the messages so if you want to
program something controlling the
communication between two processes then
it is easy because you don't have to
worry about the size of the message that
has to be sent it can be of any size so
the programming task becomes simpler so
those are the
two kinds of message sizes that we have
fixed and variable size
now if process p and q wants to
communicate they must send messages to
and receive messages from each other so
let's say that we have two processes p
and q that wants to communicate so if
they want to communicate then they must
send messages to and receive messages
from each other p and q must be able to
send messages to each other and p and q
also must be able to receive messages
from each other now how can we
facilitate this so in order to make this
happen a communication link must exist
between them so there must be a
communication link between the process p
and process q so that they can have
communication with each other so unlike
shared memory in which the communication
took place by writing into a region of
shared memory and reading from the
region of shared memory so in case of
message passing system we must have a
communication link between the two
processes that wants to communicate
so how do we implement this
communication link so this link can be
implemented in a variety of ways there
are several methods for logically
implementing a link and the send
and receive operations like the ones
given below so here we are concerned
about the ways for logically
implementing a link we are not concerned
about how to physically implement the
link so the way in which the link can be
physically implemented will be discussed
in another chapter later on but we are
concerned about how can we logically
implement this link between the two
processes that wants to communicate and
send the messages to each other
so it says here that we have several
methods for implementing this link and
the send and receive operations we have
already discussed the send and receive
operations so for implementing this
there are several methods like the ones
given below
like direct or indirect communication
synchronous or asynchronous
communication
automatic or explicit buffering and
there are several issues related with
features like naming synchronization and
buffering so these are the methods we
have in which we can logically implement
a link so that the processors can
communicate to each other and there are
several issues associated with these
features which are given here like
naming synchronization and buffering so
this part which is the methods for
logically implementing a link and the
issues associated with these features
like naming synchronization and
buffering will be discussed in the
second part of this lecture so i hope
this first part of message passing
systems are clear to you thank you for
watching and see you in the next one
[Music]
[Applause]
[Music]
you
Browse More Related Video
Operating System: Inter Process Communication: Message Passing Shared Memory
Lamport's Mutual Exclusion Distributed Systems Synchronization
Interprocessor Communication and Syncronization (Computer Architecture)
Communication in ClientโServer Systems-Operating Systems-Unit-2-20A05402T
Sistemas Computacionais - Tรฉcnica de memรณria virtual: paginaรงรฃo e segmentaรงรฃo
Types of System Calls
5.0 / 5 (0 votes)