ex-9-22-05 - CECS 326 Lab Exercise 9/22/05 (20 points) Due...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CECS 326 Lab Exercise 9/22/05 (20 points) Due 9/29/05 Cooperating processes often need to communicate between them. One mechanism Linux provides for interprocess communication is message queues. A message queue must first be aquired from the operating system by calling msgget. Control operations, e.g., remove, can be performed on an existing message queue by calling msgctl. Processes with appropriate permissions may send and/or receive messages via the message queue by calling msgsnd and msgrcv. A very useful function named ftok() can be used to convert a file name into a key for msgget call. Please consult the man pages of these system calls for details. For this exercise you need to write three C++ programs named master.cpp , sender.cpp , and receiver.cpp , which should be compiled into master , sender , and receiver , respectively. Together they should do the following: The master program should first acquire a message queue from the operating system, followed by creating two...
View Full Document

This note was uploaded on 04/11/2010 for the course CECS 326 taught by Professor Staff during the Spring '08 term at CSU Long Beach.

Ask a homework question - tutors are online