Sponsored Content
Full Discussion: Producer/Consumer
Top Forums UNIX for Dummies Questions & Answers Producer/Consumer Post 77419 by vino on Friday 8th of July 2005 03:29:13 AM
Old 07-08-2005
poorni_uma,

Please dont bump-up/repost questions. Thats against the forum rules.

Thanks,
Vino
 

10 More Discussions You Might Find Interesting

1. Programming

producer-consumer problem

The intention of the program. Create N threads with 2 shared memories. One shared memory to write, one shared memory to recieve. Consumer creates 2 shared memory to share with producer. I need H threads for the producer as well(somebody help on it..) Also another question, would segment_id... (2 Replies)
Discussion started by: joey
2 Replies

2. UNIX for Dummies Questions & Answers

Slow Producer - Fast consumer

I would like to loop through a set of directories, performing operation(s) on each one. The basic script** is dirs=`find . -name .svn -print` for f in $dirs; do echo "Processing $f directory .." done Fine and dandy, but here is the problem: the find expression must complete... (2 Replies)
Discussion started by: jakeo25
2 Replies

3. UNIX for Dummies Questions & Answers

Slow Producer - Fast consumer

I would like to loop through a set of directories, performing operation(s) on each one. The basic script** is dirs=`find . -name .svn -print` for f in $dirs; do echo "Processing $f directory .." done Fine and dandy, but here is the problem: the find expression must complete... (7 Replies)
Discussion started by: jakeo25
7 Replies

4. Programming

producer consumer

Control two exclusively shared resources. The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers. Can any one help me with the code. ... (0 Replies)
Discussion started by: gokult
0 Replies

5. Shell Programming and Scripting

producer consumer

Control two exclusively shared resources. The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers. Can any one help me with the code. ... (1 Reply)
Discussion started by: gokult
1 Replies

6. UNIX for Advanced & Expert Users

producer consumer

Control two exclusively shared resources(semaphore). The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers. Can any one help me with the... (0 Replies)
Discussion started by: gokult
0 Replies

7. Programming

producer consumer semaphore

Control two exclusively shared resources(semaphore). The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers. Can any one help me with the... (0 Replies)
Discussion started by: gokult
0 Replies

8. UNIX for Dummies Questions & Answers

producer consumer

Control two exclusively shared resources. The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers. Can any one help me with the code. ... (3 Replies)
Discussion started by: gokult
3 Replies

9. Homework & Coursework Questions

producer consumer semaphore

Control two exclusively shared resources(semaphore). The two resources are two files. The producer will write even numbers to one file, and odd numbers to another one. The consumer respectively reads from each file until it gets 5 even numbers and 5 odd numbers. Can any one help me with the... (1 Reply)
Discussion started by: gokult
1 Replies

10. UNIX for Dummies Questions & Answers

Abnormal producer consumer problem driving me nuts

normally, i hate asking someone to do my homework for me but am getting desperate right now. i have a project about consumer producer problem. the deadline is tonight at 23:55. but i havent gotten it working yet. i just COULDNT get it to work right yet. the problem is as follows: the C - program... (0 Replies)
Discussion started by: alexantosh
0 Replies
dat_lmr_sync_rdma_write(3DAT)			     Direct Access Transport Library Functions			     dat_lmr_sync_rdma_write(3DAT)

NAME
dat_lmr_sync_rdma_write - synchronize local memory with RDMA write on non-coherent memory SYNOPSIS
cc [ flag... ] file... -ldat [ library... ] #include <dat/udat.h> DAT_RETURN dat_lmr_sync_rdma_write ( IN DAT_IA_HANDLE ia_handle, IN const DAT_LMR_TRIPLET *local_segments, IN DAT_VLEN num_segments ) PARAMETERS
ia_handle A handle for an open instance of the IA. local_segments An array of buffer segments. num_segments The number of segments in the local_segments argument. DESCRIPTION
The dat_lmr_sync_rdma_write() function makes effects of an incoming RDMA Write operation visible to the Consumer. This operation guarantees consistency by locally invalidating the non-coherent cache whose buffer has been populated by remote peer RDMA write operations. The dat_lmr_sync_rdma_write() function is needed if and only if the Provider attribute specifies that this operation is needed after an incoming RDMA Write operation. The Consumer must call dat_lmr_sync_rdma_write() before reading data from a memory range in this region that was the target of an incoming RDMA Write operation. The dat_lmr_sync_rdma_write() function must be called after the RDMA Write operation completes, and the memory range that was modified by the RDMA Write must be supplied by the caller in the local_ segments array. After this call returns, the Consumer may safely see the modified contents of the memory range. It is permissible to batch synchronizations of multi- ple RDMA Write operations in a single call by passing a local_segments array that includes all modified memory ranges. The local_segments entries need not contain the same LMR and need not be in the same Protection Zone. The Consumer must also use dat_lmr_sync_rdma_write() when performing local writes to a memory range that was or will be the target of incoming RDMA writes. After performing the local write, the Consumer must call dat_lmr_sync_rdma_write() before the RDMA Write is initi- ated. Conversely, after an RDMA Write completes, the Consumer must call dat_lmr_sync_rdma_write() before performing a local write to the same range. If the Provider attribute specifies that this operation is needed and the Consumer attempts to read from a memory range in an LMR without properly synchronizing using dat_lmr_sync_rdma_write(), the returned contents are undefined. If the Consumer attempts to write to a memory range without properly synchronizing, the contents of the memory range become undefined. RETURN VALUES
DAT_SUCCESS The operation was successful. DAT_INVALID_HANDLE The DAT handle is invalid. DAT_INVALID_PARAMETER One of the parameters is invalid. For example, the address range for a local segment fell outside the boundaries of the corresponding Local Memory Region or the LMR handle was invalid. USAGE
Determining when an RDMA Write completes and determining which memory range was modified is the Consumer's responsibility. One possibility is for the RDMA Write initiator to post a Send DTO message after each RDMA Write that identifies the range in the body of the Send. The Consumer at the target of the RDMA Write can receive the message and know when and how to call dat_lmr_sync_rdma_write(). This call ensures that the Provider receives a coherent view of the buffer contents after a subsequent remote RDMA Write operation. After the call completes, the Consumer can be assured that all platform-specific buffer and cache updates have been performed, and that the LMR range has consistency with the Provider hardware. Any subsequent read by the Consumer can void this consistency. The Provider is not required to detect such access. The action performed on the cache before the RDMA Write depends on the cache type: o I/O noncoherent cache will be flushed. o CPU noncoherent cache will be invalidated. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard: uDAPL, 1.2 | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
dat_lmr_sync_rdma_read(3DAT), libdat(3LIB), attributes(5) SunOS 5.11 16 Jul 2004 dat_lmr_sync_rdma_write(3DAT)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy