|
|
examples of producer-consumer models?
Hi all.
I have three programs I need to write to interact with one another via
shared memory. Shared memory portions of the code are written and
working just fine for allocating the shared memory and mapping a
structure over top to access portions of that memory for data
movement.
Where I'm stuck is signaling these processes from one another to wake
them up to know when to act on the signals to move the data around.
The first process (A) needs to pass data to process (B) which then
needs to wait for a signal from process (C) to pass the data from (B)
to (C). As soon as (A) gets data, it needs to signal (B) so (B) can
buffer everything, but (B) needs to wait for a signal from (C) before
sending any of that data to (C).
Hope that makes sense.
I'm at a loss for where to look for this kind of code. I haven't been
around C for quite a few years, even longer for this sort of work, and
I'm pretty stumped. I'd appreciate any tips, links or example code.
Thanks much,
-id
|
|
0
|
|
|
|
Reply
|
google
|
7/29/2004 6:46:34 PM |
|
On Thu, 29 Jul 2004 11:46:34 -0700, ian douglas wrote:
> Hi all.
>
> I have three programs I need to write to interact with one another via
> shared memory. Shared memory portions of the code are written and
> working just fine for allocating the shared memory and mapping a
> structure over top to access portions of that memory for data
> movement.
>
> Where I'm stuck is signaling these processes from one another to wake
> them up to know when to act on the signals to move the data around.
Use sysv semaphores. (e.g. man semget). They are not the easiest
thing to be introduced to though. Unix Network Programming by R. Stevens
have some nice examples though, get the book.
|
|
0
|
|
|
|
Reply
|
iso
|
7/29/2004 7:37:50 PM
|
|
|
1 Replies
511 Views
(page loaded in 0.048 seconds)
Similiar Articles: examples of producer-consumer models? - comp.unix.programmer ...Hi all. I have three programs I need to write to interact with one another via shared memory. Shared memory portions of the code are written and work... one producer thread, one consumer thread: mutex needed? - comp ...For example, it will ensure that the size of the available data is not ... examples of producer-consumer models? - comp.unix.programmer ... one producer thread, one ... HELP - Modeling pipe threads - comp.cad.solidworksexamples of producer-consumer models? - comp.unix.programmer ... HELP - Modeling pipe threads - comp.cad.solidworks 64QAM Simulink Model - comp.soft-sys.matlab examples of ... system requirements for solidworks 2004 - comp.cad.solidworks ...examples of producer-consumer models? - comp.unix.programmer ... On Thu, 29 Jul 2004 11:46:34 -0700, ian douglas ... HELP - Modeling pipe threads - comp.cad.solidworks ... vxdisk sees only one path - comp.unix.solarisexamples of producer-consumer models? - comp.unix.programmer ... vxdisk sees only one path - comp.unix.solaris examples of producer-consumer models? - comp.unix.programmer ... Problem with pthreads C++ wrapper class on Linux - comp ...Problem with pthreads C++ wrapper class on Linux - comp ... examples of producer-consumer models? - comp.unix.programmer ... Problem with pthreads C++ wrapper class on ... top 10 uses for random data compression?? anyone? - comp ...For example, he relates that Tony Bradlee found the diary. ... The nasty producer rarely forgives Hassan, it tests Dolf ... Clint, on to eggs empty and mad, models up it, forcing ... Producer-consumer problem - Wikipedia, the free encyclopediaThe consumer producer problem (also known as the bounded-buffer problem) is a classical example of a multi- process synchronization problem. The problem describes two ... examples of producer-consumer models? - comp.unix.programmer ...Hi all. I have three programs I need to write to interact with one another via shared memory. Shared memory portions of the code are written and work... 7/23/2012 1:25:50 PM
|
|
|
|
|
|
|
|
|