written 6.9 years ago by | modified 2.8 years ago by |
Subject: Operating System
Topic: PROCESS COORDINATION
Difficulty: Hard
written 6.9 years ago by | modified 2.8 years ago by |
Subject: Operating System
Topic: PROCESS COORDINATION
Difficulty: Hard
written 6.7 years ago by |
Message passing sends a message to a process and relies on the process and the supporting infrastructure to select and invoke the actual code to run.
Message passing differs from conventional programming where a process, subroutine, or function is directly invoked by name.
Message passing is key to some models of concurrency and object-oriented programming.
Message passing is used ubiquitously in modern computer software. It is used as a way for the objects that make up a program to work with each other and as a way for objects and systems running on different computers to interact.
Message passing may be implemented by various mechanisms, including channels.
Message passing is a technique for invoking behavior on a computer.
In contrast to the traditional technique of calling a program by name, message passing uses an object model to distinguish the general function from the specific implementations.
The invoking program sends a message and relies on the object to select and execute the appropriate code.
The justifications for using an intermediate layer essentially falls into two categories: encapsulation and distribution.
Encapsulation is the idea that software objects should be able to invoke services on other objects without knowing or caring about how those services are implemented.
Encapsulation can reduce the amount of coding logic and make systems more maintainable
Distributed message passing provides developers with a layer of the architecture that provides common services to build systems made up of sub-systems that run on disparate computers in different locations and at different times.
Synchronous Message Passing:
Synchronous message passing occurs between objects that are running at the same time.
Synchronous message passing is what typical object-oriented programming languages such as Java and Small talk use
Asynchronous Message Passing:
Asynchronous message passing it is possible for the receiving object to be busy or not running when the requesting object sends the message.
Asynchronous message passing requires additional capabilities for storing and re-transmitting data for systems that may not run concurrently.