You are on page 1of 3

Shared Memory System

Memory shared between two address space.

Address Space:

Address Space is a space in computer memory. And process Address Space means a space allocated
in memory for a process.

 Interprocess communication using shared memory


requires communicating process to establish region of
shared memory
 Typically, shared memory region resides in the address
space of the process creating the shared memory y
segment.
 Other process that wishes to communicate using the
shared memory segment must attach it to their address
space

 Normally ,the operating system tries to prevent one


process from access another process memory

 Shared memory required two or more process to remove


this restriction

Producer Consumer Problem

A process produces information that is consumed by a consumer process.


Note:
A consumer can not consume information until producer produce information.
Example:
A compiler may produce assembly code, which is consumed by an assembler.
Client Server Example.
A Server produce information client uses server information.
What is Producer Consumer Problem ?.

Problem:
Producer can not add data into Buffer if it is full.
Consumer Wait to Consumer data if it is empty.

Unbonded Buffer:
Unlimited size the producer can produce unlimited information.
Consumer can consumer unlimited information.

Bonded Buffer:
Producer can producer limited information.
Consumer can comsumer limited information.

You might also like