Message Passing Systems (Part 1)

Neso Academy
16 Sept 201810:40

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

00:00

📚 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.

05:01

🔌 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.

10:04

🔄 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

Message Passing Systems are a type of inter-process communication mechanism that allows processes to communicate and synchronize their actions without sharing the same address space. This is particularly useful in distributed environments where processes may reside on different computers connected by a network. In the video, this concept is the central theme, as it is contrasted with shared memory systems and explained as a way for processes to exchange information through messages rather than shared memory regions.

💡Inter-Process Communication (IPC)

Inter-Process Communication refers to the mechanisms that allow different processes to exchange information. In the context of the video, IPC is discussed in relation to both shared memory systems and message passing systems. The script explains how shared memory and message passing are two distinct methods for processes to communicate, with message passing being the focus of the lecture.

💡Shared Memory Systems

Shared Memory Systems are a method of IPC where two or more processes communicate by sharing a portion of memory that resides in the address space of one of the processes. The script contrasts this with message passing systems, highlighting that in shared memory systems, processes write to or read from a shared memory region to communicate, whereas in message passing, communication is done through the exchange of messages.

💡Distributed Environment

A Distributed Environment is a network of computers that work together and communicate with each other. In the video, the distributed environment is used as an example to illustrate the utility of message passing systems. It is mentioned in the context of internet chat, where processes on different systems communicate by sending and receiving messages over a network.

💡Send Message Operation

The 'Send Message' operation is a fundamental part of message passing systems. It allows a process to transmit a message to another process with which it wishes to communicate. The script explains this operation as one of the two basic operations provided by a message passing facility, essential for processes to initiate communication.

💡Receive Message Operation

The 'Receive Message' operation complements the 'Send Message' operation in message passing systems. It enables the recipient process to get the message sent by another process. The video script describes this as the operation that allows processes to receive communication from their counterparts.

💡Fixed Size Messages

Fixed Size Messages are a type of message in message passing systems where the size or length of the message is predetermined and cannot be exceeded. The script discusses the implementation of fixed size messages as being straightforward at the system level but more challenging for programmers who must ensure that their messages adhere to the fixed size constraint.

💡Variable Size Messages

Variable Size Messages, in contrast to fixed size messages, allow for the message size to vary. The script explains that while implementing variable size messages requires a more complex system level design, it simplifies the programming task as there are no restrictions on the size of the messages being sent.

💡Communication Link

A Communication Link is a logical connection established between two processes that need to communicate with each other in a message passing system. The script emphasizes the necessity of such a link for processes to send and receive messages, unlike in shared memory systems where communication occurs through a shared memory region.

💡Direct Communication

Direct Communication is one of the methods for logically implementing a link in message passing systems. The script mentions this as a method without going into detail, but it implies that in direct communication, a process sends a message directly to another specific process, which is an essential aspect of how message passing systems facilitate communication.

💡Synchronous Communication

Synchronous Communication is a concept related to message passing where the sender process waits for the receiver process to acknowledge the receipt of the message before proceeding. The script does not delve into this concept deeply, but it is listed as one of the methods for implementing communication in message passing systems, indicating its importance in the synchronization of processes.

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

play00:00

in this lecture we'll be studying about

play00:01

message passing systems in the previous

play00:04

lecture we have studied about another

play00:06

kind of inter-process communication

play00:08

which was a shared memory systems in

play00:10

which if two process wants to

play00:12

communicate they do so by sharing a

play00:15

portion of memory which resides in the

play00:17

address space of one of the processes

play00:20

and when they want to communicate they

play00:22

write to that shared memory or they read

play00:24

from that shared memory now we'll be

play00:26

discussing the next kind of

play00:28

inter-process communication which is the

play00:30

message passing systems so we have seen

play00:32

a brief introduction about this message

play00:34

passing systems when we discussed the

play00:36

lecture of inter-process communication

play00:39

but in this lecture we'll be studying in

play00:41

more detail about this message passing

play00:43

system and how this message passing

play00:45

systems actually work

play00:47

so message passing provides a mechanism

play00:50

to allow processes to communicate and to

play00:52

synchronize their actions without

play00:55

sharing the same address space

play00:57

and is particularly useful in a

play00:59

distributed environment

play01:01

where the communicating processes may

play01:04

reside on different computers connected

play01:06

by a network so as i already told you

play01:09

when we discuss about shared memory

play01:11

system we saw that the communication

play01:14

took place by sharing a region of memory

play01:17

between the two processes but in this

play01:20

message passing system we are not going

play01:22

to share any region of memory but we are

play01:25

going to have a communication between

play01:26

two or more processes without sharing

play01:29

any address space

play01:31

and why is this useful this is useful in

play01:34

a distributed environment so for example

play01:37

let's say that the processes that wants

play01:39

to communicate they lie within the same

play01:42

system suppose two processes within the

play01:44

same system wants to communicate then it

play01:47

is easy for them to create a shared

play01:49

region of memory which is a shared

play01:51

memory and they can communicate using

play01:53

that shared region of memory so as we

play01:56

already studied the shared memory it

play01:58

lies in the address space of one of the

play02:00

processes and both the processes that

play02:03

wants to communicate needs to be able to

play02:06

access that region of shared memory but

play02:09

think of a scenario in which you have a

play02:12

distributed environment or a

play02:14

communication process that resides on

play02:17

computers connected by a network so for

play02:19

this let us take the example of internet

play02:21

chat so let's say that you are chatting

play02:23

with your friend over the internet so

play02:25

you are sending message from your system

play02:28

and your friend is receiving the

play02:30

message in his system that is located

play02:32

somewhere else

play02:33

so even in this place the two processes

play02:36

needs to communicate your process from

play02:38

your system and the process in your

play02:41

friend system also needs to communicate

play02:44

but they are not residing in the same

play02:45

system but they are residing in

play02:47

different systems connected through a

play02:50

network so in this scenario it is

play02:52

difficult to create a region of shared

play02:55

memory that can be accessed by these two

play02:58

processes so in this kind of scenario

play03:00

message passing system can be used where

play03:03

the communicating processes will

play03:05

communicate via some kind of messages

play03:08

which will be sent from one process to

play03:11

another process so in this way they

play03:13

don't need to have a region of shared

play03:15

memory but they can send messages to

play03:17

another process and also it can receive

play03:19

messages from other processes so that is

play03:22

how message passing systems work so

play03:25

we'll go into the details of message

play03:27

passing systems and we will see what are

play03:29

his features and how does this message

play03:31

passing system actually work so the

play03:34

message passing facility provides at

play03:36

least two operations which are send

play03:39

message and receive message so these are

play03:41

the two operations provided by a message

play03:44

passing facility the first one is send

play03:47

message so from the name itself it is

play03:49

understood that send message is the

play03:51

operation that allows the process to

play03:54

send the message to the other process to

play03:56

which it wants to communicate and then

play03:59

we have the receive message operation so

play04:02

the receive message operation

play04:04

is the operation which allows the

play04:06

process which is the recipient of the

play04:08

message to receive the message from the

play04:11

other process that is sending the

play04:13

message

play04:14

so these are the two operations that we

play04:16

have in a message passing facility and

play04:19

then

play04:19

message sent by a process can be of

play04:22

either fixed or variable length so when

play04:24

the message is being sent from one

play04:26

process to another process

play04:28

the length of the message or the size of

play04:30

the message can be either of fixed size

play04:33

or variable size so fixed size means the

play04:36

message will have a particular size that

play04:39

will be fixed and it cannot exceed that

play04:41

size and variable size means the size of

play04:44

the message can vary it can be big or it

play04:46

can be small so let us see what are the

play04:48

features of these fixed size messages

play04:50

and variables as messages and how easy

play04:53

is it to implement these two kind of

play04:56

message sizes so in fixed size the

play04:59

system level implementation is

play05:01

straightforward

play05:02

but

play05:03

makes the task of programming more

play05:05

difficult now why do we say this in

play05:08

fixed size it says that the system level

play05:10

implementation is straightforward it

play05:12

says so because if you are going to

play05:15

implement a fixed size system the system

play05:17

level implementation is easy or it is

play05:19

not very difficult because when you are

play05:21

designing your system you have to design

play05:23

your system in such a way that the

play05:26

length of the messages that will be sent

play05:27

by the processes will be of fixed size

play05:30

so in that way the implementation is

play05:32

straightforward so the system level

play05:35

implementation that means the way in

play05:37

which the system is implemented is

play05:40

straightforward and easy because you

play05:42

just have to maintain a fixed size

play05:45

but it makes a task of programming more

play05:47

difficult now the task of programming

play05:50

becomes more difficult now what is the

play05:51

task of programming so when you are

play05:54

programming you may have to control the

play05:56

way in which the messages are sent from

play05:59

one process to another but you have to

play06:01

always keep in mind that the size of the

play06:05

message should be fixed you cannot vary

play06:08

your

play06:09

size of the message so sometimes when

play06:11

you are programming you may want to have

play06:13

messages of larger sizes but it is not

play06:17

possible because we are only allowed to

play06:19

have messages of fixed size so that is

play06:21

why it says the task of programming

play06:24

becomes more difficult in this fixed

play06:26

size method now coming to the variable

play06:28

size it requires a more complex system

play06:31

level implementation but the programming

play06:34

task becomes simpler so in case of

play06:37

variable size messages it requires a

play06:39

more complex system level implementation

play06:41

which means that when you are designing

play06:44

the system it may be a little more

play06:46

complex or it may be a little more

play06:48

difficult because you have to allow the

play06:51

messages to be of any size or variable

play06:54

size the size should be allowed to vary

play06:57

so when you are designing something of

play06:59

that form the messages should be allowed

play07:02

to take any size they may be bigger size

play07:04

or smaller size and it must be versatile

play07:07

in that way so the system level

play07:10

implementation becomes more complex but

play07:12

the programming task becomes simpler but

play07:15

in this case the programming task

play07:17

becomes simpler because when you are

play07:19

programming it is easy for you because

play07:21

you are not having a restriction on the

play07:24

size of the messages so if you want to

play07:26

program something controlling the

play07:28

communication between two processes then

play07:31

it is easy because you don't have to

play07:33

worry about the size of the message that

play07:36

has to be sent it can be of any size so

play07:39

the programming task becomes simpler so

play07:42

those are the

play07:43

two kinds of message sizes that we have

play07:46

fixed and variable size

play07:48

now if process p and q wants to

play07:50

communicate they must send messages to

play07:53

and receive messages from each other so

play07:56

let's say that we have two processes p

play07:58

and q that wants to communicate so if

play08:00

they want to communicate then they must

play08:03

send messages to and receive messages

play08:06

from each other p and q must be able to

play08:08

send messages to each other and p and q

play08:11

also must be able to receive messages

play08:13

from each other now how can we

play08:15

facilitate this so in order to make this

play08:17

happen a communication link must exist

play08:20

between them so there must be a

play08:22

communication link between the process p

play08:25

and process q so that they can have

play08:28

communication with each other so unlike

play08:30

shared memory in which the communication

play08:33

took place by writing into a region of

play08:35

shared memory and reading from the

play08:37

region of shared memory so in case of

play08:39

message passing system we must have a

play08:42

communication link between the two

play08:44

processes that wants to communicate

play08:46

so how do we implement this

play08:47

communication link so this link can be

play08:50

implemented in a variety of ways there

play08:52

are several methods for logically

play08:54

implementing a link and the send

play08:57

and receive operations like the ones

play09:00

given below so here we are concerned

play09:02

about the ways for logically

play09:04

implementing a link we are not concerned

play09:07

about how to physically implement the

play09:09

link so the way in which the link can be

play09:11

physically implemented will be discussed

play09:13

in another chapter later on but we are

play09:15

concerned about how can we logically

play09:18

implement this link between the two

play09:19

processes that wants to communicate and

play09:22

send the messages to each other

play09:24

so it says here that we have several

play09:25

methods for implementing this link and

play09:28

the send and receive operations we have

play09:30

already discussed the send and receive

play09:32

operations so for implementing this

play09:34

there are several methods like the ones

play09:36

given below

play09:37

like direct or indirect communication

play09:40

synchronous or asynchronous

play09:42

communication

play09:43

automatic or explicit buffering and

play09:46

there are several issues related with

play09:48

features like naming synchronization and

play09:51

buffering so these are the methods we

play09:53

have in which we can logically implement

play09:56

a link so that the processors can

play09:59

communicate to each other and there are

play10:01

several issues associated with these

play10:03

features which are given here like

play10:06

naming synchronization and buffering so

play10:09

this part which is the methods for

play10:11

logically implementing a link and the

play10:14

issues associated with these features

play10:16

like naming synchronization and

play10:18

buffering will be discussed in the

play10:20

second part of this lecture so i hope

play10:22

this first part of message passing

play10:24

systems are clear to you thank you for

play10:26

watching and see you in the next one

play10:28

[Music]

play10:29

[Applause]

play10:31

[Music]

play10:39

you

Rate This

5.0 / 5 (0 votes)

Ähnliche Tags
IPCMessage PassingDistributed SystemsCommunicationShared MemoryNetworkingProcess SynchronizationInternet ChatSynchronousAsynchronous
Benötigen Sie eine Zusammenfassung auf Englisch?