Question

there are fundamental models of interprocess communication: shared memory and message passing.Compare between these two models...

there are fundamental models of interprocess communication: shared memory and message passing.Compare between these two models in terms of: using system calls , implementation of distributed operating system, performance of execution , synchronization issue between processes. Justify the answer in each case

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Comparison between shared memory and message passing interprocess communication model:
Shared memory interprocess communication model:

In terms of system calls, they are required only to establish shared-memory regions and when established, all accesses to the shared memory are considered routine or regular memory accesses without any assistance from the kernel and hence, shared memory is faster.

In terms of implementation of a distributed operating system, it is not ideal for a distributed operating system as in distributed operating system the computers do not share their main memory as each one of them is an isolated computer system. Hence, interprocess communication mechanism through shared memory such as semaphores, cannot be used. Hence, the message passing interprocess communication model is used.

In terms of performance of execution, when multiple processes are executing simultaneously, they share some resources or use information from other processes. One process during its execution creates information about certain calculations or computations, or resources used and stores it as a record in the shared memory. The second process uses the same reading the shared and stored information in the record in shared memory for its execution purpose. There is a possibility of overlapping of multiple processes either writing or reading the same information in the shared memory. It can run processes which would, in turn, execute programs concurrently. The throughput is high. It can be used for real-time processing.

In terms of synchronization issue between processes, the shared memory model uses the shared memory to be simultaneously accessed by multiple processes to read and write so processes communicate with one another. All POSIX systems and Windows operating systems use shared memory. It is difficult to be implemented than in Message Passing model. The memory communication is convenient and is faster to the maximum on the same machine as connection setup does not take much time and it is happening at memory speeds. It has synchronization and memory protection problems though. Basically, memory is shared amongst processes to exchange information writing and read from it. Processes overwrite to the same location simultaneously.

Message passing interprocess communication model:

In terms of system calls, it is implemented using system calls and hence it is a more time-consuming task of kernel intervention.

In terms of implementation of distributed operating system, it is useful in a distributed environment where the communicating processes reside and run on different network connected systems such as a networked cluster of nodes where nodes are networked together, each with multiple cores using their own its own local memory and the communication happens between the nodes and cores through messages in the queues.

In terms of performance of execution, there is a possibility of blocking from writing or reading the information stored in the message queue due to either the received process has not at all received any message from the queue making it full for any further message to be written or the reading process does not have anything to be read as the writing process has not written anything yet, respectively in the message queue. This problem blocks the execution time in waiting for both, the writing and the reading processes. It cannot run processes, which, in turn, would not execute programs concurrently. The throughput is low. It is not ideal for real-time processing.

In terms of synchronization issue between processes, it lets multiple processes to read and write data to a message queue without being connected to one another. Sending and receiving processes are involved in this model. These written messages are stored on the queue for the corresponding recipient processes to read them. Hence, message queues are useful for interprocess communication used by Windows XP, Mac, and most operating systems. Message queue for the synchronization of interprocess communication is tolerant of higher communication latencies. It is easier to be implemented than in synchronization of interprocess communication in a shared memory model. The communication is slower on the same machine as connection setup takes time. Basically, messages are exchanged amongst processes.

Add a comment
Know the answer?
Add Answer to:
there are fundamental models of interprocess communication: shared memory and message passing.Compare between these two models...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Follow the example programs unix_pipe.c, named_pipe.c and shm-posix-combined.c to write three versions (two pipe versions and one shared memory version) of an interprocess communication program (A8p2_unixpipe.c[pp], A8p2_namedpipe.c[pp] and A8p2_shm.c[pp]

    Follow the example programs unix_pipe.c, named_pipe.c and shm-posix-combined.c to write three versions (two pipe versions and one shared memory version) of an interprocess communication program (A8p2_unixpipe.c[pp], A8p2_namedpipe.c[pp] and A8p2_shm.c[pp]) in C/C++. Each version should create two processes using fork. One of the two processes should send or share twenty random integers a1,…,a20 in the range from -19 to 19 inclusive to the other process. The sending process should print out the values of these integers. The receiving process should decide and print out whether the two vectors (a1,…,a10) and...

  • 1. Write two programs that play a trivia game using shared memory. Include examples of your...

    1. Write two programs that play a trivia game using shared memory. Include examples of your program output in a report. In order to synchronize the question-answer-result sequence, you will force processes to sleep. Create separate server and client programs (two .c files) according to the following design requirements .The server is assumed to be executed before the client. . The server creates the shared memory and writes a string to shared memory containing the trivia question and sleeps for...

  • Consider the following two threads of a process, to be run concurrently in a shared memory...

    Consider the following two threads of a process, to be run concurrently in a shared memory (all variables are shared between the two threads): Assume the following: 1. a single-core system 2. load and store are atomic (i.e. they start and finish without interruption) 3. x is initialized to 0 before either thread starts, and 4. x must be loaded into a register before being incremented (and stored back to memory afterwards). The following questions consider the final value of...

  • Four modes vs. two modes of operationg systems (kernel / user)

    The VAX/ VMS operating system makes use of four processor access modes to facili-tate the protection and sharing of system resources among processes. The accessmode determines:• Instruction execution privileges: What instructions the processor may execute• Memory access privileges: Which locations in virtual memory the current instruc-tion may accessThe four modes are as follows:• Kernel: Executes the kernel of the VMS operating system, which includes memo-ry management, interrupt handling, and I/ O operations• Executive: Executes many of the operating system service...

  • Fundamental Programming Question 1 (a) Consider each of the following questions carefully. You are required to...

    Fundamental Programming Question 1 (a) Consider each of the following questions carefully. You are required to give the answer true or false and justify your answer. If it is true, explain why it is true i. Linked lists are statically allocated. [2 marks] ii. Automatic variables are destroyed (deallocated) by the C++ runtime system [2 marks] i. You cannot make a reference to unallocated memory when using a vector [2 marks] iv. The virtual keyword turns off runtime checking [2...

  • Question Background All models of memory suggest the existence of short-term memory (STM) function with two...

    Question Background All models of memory suggest the existence of short-term memory (STM) function with two major features: 1) the quantity of information that can be held in STM is limited, and 2) information stays in STM for only a short period of time if something isn’t done to keep it there. One of the processes people use to keep information in STM is maintenance rehearsal, i.e., mentally repeating the information over and over again. 1 For many years, cognitive...

  • The VAX/ VMS operating system makes use of four processor access modes to facili-tate the protection...

    The VAX/ VMS operating system makes use of four processor access modes to facili-tate the protection and sharing of system resources among processes. The access mode determines:• Instruction execution privileges: What instructions the processor may execute• Memory access privileges: Which locations in virtual memory the current instruc-tion may access The four modes are as follows:• Kernel: Executes the kernel of the VMS operating system, which includes memo-ry management, interrupt handling, and I/ O operations• Executive: Executes many of the operating...

  • In this assignment, you will implement a Memory Management System(MMS). Using C Programming Language..... MAKE SURE...

    In this assignment, you will implement a Memory Management System(MMS). Using C Programming Language..... MAKE SURE YOU USE C PROGRAMMING Your MMS will handle all requests of allocation of memory space by different users (one thread per user) …. HINT(You will use Pthreads and Semaphores). Your MMS will provide the user with an interface for making memory requests and also for freeing up memory that is no longer needed by the user. One of the jobs of your memory management...

  • CASE II AziTech is considering the design of a new CPU for its new model of...

    CASE II AziTech is considering the design of a new CPU for its new model of computer systems for 2021. It is considering choosing between two (2) CPU (CPUA and CPUB) implementations based on their performance. Both CPU are expected to have the same instruction set architecture. CPUA has a clock cycle time of 60 ns and CPUB has a clock cycle time of 75 ns. The same number of a particular instruction type is expected to be executed on...

  • Vocabulary Exercises is the communication channel that connects all computer system components Cache types that are...

    Vocabulary Exercises is the communication channel that connects all computer system components Cache types that are generally implemented on the same chip as the CPU include 3. thus controlling access to the bus by all other The CPU is always capable of being a(a) devices in the computer system. 4. An) is a reserved area of memory used to resolve differences in data transfer rate or data transfer unit size. 5. A(n) is an area of fast memory where data...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT