2. In the context of inter-process communication:
a) Explain the advantage(s) of a shared
memory solution.
b) Explain the advantage(s) of a message
passing solution.
c) Explain the semantics of a
blocking read.
2. a)
Shared Memory :
It is one of the models of inter-process communication (IPC) where two or more than two processes share a common portion of memory area (virtual memory space) to communicate among each other. The advantages of this model are enlisted below.
b)
Message Passing :
In this IPC model two processes communicate with each other by sending and receiving messages . The message can be signals, functions, complex data structures, or data packets . There are two types of message passing Synchronous and Asynchronous . The advantages of this model are enlisted below.
c)
Blocking Read :
There are couple of IPC protocols are available to ensure that the data is delivered to the destination and the delivery information should be returned to the sender process. We can achieve this by blocking the sender process for a certain period of time . A blocking read will wait until there is data available or data gets expired or there is any time out and then it returns from the function call.
2. In the context of inter-process communication: a) Explain the advantage(s) of a shared memory solution....
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...
1-An advantage of one-way communication over two-way is the fact that A-fewer mistakes or problems are likely to arise as work progresses. B-the receiver is more likely to understand what to do with the message. C-feedback allows for suggestions and modifications. D-communication is faster and easier. E-it is more accurate communication that ensures clarity. 2-A disadvantage of oral communication is that the A-sender has no control over where, when, or if the message is received. B-message is less persuasive than...
When a process creates a new process using the fork() operation, which of the following resources is available for read/write between the parent process and the child process? a) stack b) heap c) shared memory segments. Please explain the answer fully and also explain why the other 2 options are incorrect.
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...
Read Chapter 1: The Historical Context of International Communication (pp 2-37) Due by Friday, February 8th (midnight). Earlier submissions accepted. Answer the following 4 questions: Q1: What does it mean to say that the news agency Reuters was an 'empire within the British empire'? Provide specific examples. Q2: Why did the U.S. oppose the 1970's demands for a New World Information and Communication Order (NWICO)? How relevant are the debates in this century? Q3: To what extent did the U.S....
How does a multicore computer with shared memory differ from a distributed or a clustered system with respect to the OS? Make specific reference to the OS kernel. b. Briefly explain the difference between processes and threads. c. Threads on a single core system are often handled in user mode. Explain why this is not acceptable on a multicore computer. d. Explain at least 2 ways that the OS can handle threads on a multicore computer.
2. Consider an operating system that has the fllowing process states, new, ready, waiting (or blocking), running, and terminated. Answer the following questions (a) Draw a process state transition diagram (b) Explain what may cause a process to enter the waiting state from the running state. (c) Do we need a queue for the processes in the running state? Justify your answer (d) Describe the actions taken by a kernel to context-switch between processes 2. Consider an operating system that...
1. Briefly explain why communication is a culture-specific process. 2. Explain briefly the function of a disk defragmenter. 3. Differentiate Aided Manufacture from Aided Design.
1.Explain the strategies to address constraints to communication in the workplace. 2.Explain the process of raising an issue with the supervisor related to any breach to standard procedures, laws or any issues impacting on achievement of employee, employer and/or client rights and responsibilities.
Consider 512Kx8bits dynamic RAM chips where the memory access time is 2/3 of the memory cycle time. These chips have an Address Bus, a bi-directional Data Bus, a Read/Write control line and a Chip Select line. (a) Draw the diagram of a memory organization that will contain 4 megabytes, will have a 32-bit bi-directional data bus and will yield one word (32-bits) every access time if words are read from consecutive memory locations (in bursts). Clearly show and explain the...