Cooperative Processes

My latest project in ECE 3574 is about cooperative process. The purpose of our assignment to communicate between 2 different files which includes 5 processes altogether. Cooperative process is the idea of of passing/retrieving information within the processes. There are two ways that this can be done:

1) Shared Memory

In shared memory, all communicating processes must establish a region of shared memory. Each processes then reads/writes to this shared memory location. It is important to make sure that two processes may read and write at the same time. A classic example of shared memory problem could be encountered during a producer consumer problem. The producer produces while the consumer consumes the information. The best place to put the data would be in the shared memory location which could be accessed by both the producer and consumer.

2)Message Passing

There is no memory allocated in message passing. A small mail box with a corresponding mail box number is attached to the processes. The processes send and receive data through this mailbox. A communication link must be established for two processes to communicate. My current project focus of Message Passing which utilizes Posix Message Queues.