![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| read and write from a file | rinku | Shell Programming and Scripting | 2 | 01-10-2008 10:22 PM |
| Problem with read & write | EltonSky | High Level Programming | 11 | 08-31-2006 11:35 AM |
| sed to read and write to very same file | 435 Gavea | Shell Programming and Scripting | 5 | 06-29-2006 08:04 PM |
| popening for read and write | szzz | High Level Programming | 1 | 11-18-2003 09:05 AM |
| read, write & STDOUT_FILENO.... | M3xican | High Level Programming | 2 | 07-17-2002 01:41 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Stream Read And Write Queues
Is there any possibility that a Stream Read and Write queues will interchange messages of any kind. If so what are the different possiblites and under what circumstances ?
Thanks in advance.
__________________
Regards, Satya Prakash Prasad |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Data on a Stream is passed in the form of messages. Each Stream head, STREAMS module, and driver has a read side and a write side. When messages go from one module's read side to the next module's read side they are said to be traveling upstream. Messages passing from one module's write side to the next module's write side are said to be traveling downstream.
Each Stream head, driver, and module has its own pair of queues, one queue for the read side and one queue for the write side. Messages are ordered into queues, generally on a first-in, first-out basis (FIFO), according to priorities associated with them. The queue's service procedure deals with messages on the queue, usually by removing successive messages from the queue, processing them, and calling the put procedure of the next module in the Stream to pass the message to the next queue! |
|
#3
|
|||
|
|||
|
Following is the diagram I found in SCO manuals :-
(upstream) (downstream) (up^stream) (downstr|eam) (up|stream) (downstr|eam) (up|stream) (downstrXeam) READ QUEUE«.........»WRITE QUEUE (up^stream) (downstr|eam) (up|stream) (downstr|eam) (up|stream) (downstrXeam) READ QUEUE«...........»WRITE QUEUE (upstream) (downstream) The above figure shows queue's linkage with neighboring modules with links ( solid vertical arrows - --> or --X ) in both directions. I can very well understand the flow of message from downstream to upstream direction. But according to the manual each queue locates it mates ( see dotted line ) . My question is I am not able to understand why such a relation is required or else I am completely wrong ? Thanks in advance.
__________________
Regards, Satya Prakash Prasad Last edited by S.P.Prasad; 05-22-2002 at 09:37 PM. |
|
#4
|
||||
|
||||
|
I wanted to refer to my Streams Docs before I answered this. I found the answer in UNIX SYSTEM V RELEASE 4 Programmer's Guide: Streams. On page 3-4 on my book it has the diagram you show together with some qinit stuff.
I suspect that your book may be similiar to mine. My chapter 4 is STREAMS Processing Routines. On page 4-4, the Asynchonous Protocol Stream Example starts. A few pages in I have: Quote:
|
|
#5
|
|||
|
|||
|
Sir, I am referring SCO Streams Runtime Systems Release and Installation Notes Manual - Streams Programmers Guide.
The diagram, which I have designed in my previous message, exists in Chapter 5 page 3. Sir, could you explain me some basics concepts of Streams Scheduler with reference to queues. What is a Scheduling queue? I found out that the q_link member of queue_t structure actually holds link to the queue scheduler. Kindly explain the scheduling operations.
__________________
Regards, Satya Prakash Prasad |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|