The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2002
Registered User
 

Join Date: Jan 2002
Location: India
Posts: 111
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  
Old 05-22-2002
killerserv's Avatar
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
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  
Old 05-22-2002
Registered User
 

Join Date: Jan 2002
Location: India
Posts: 111
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  
Old 05-23-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
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:
CHARPROC causes the echo to be transmitted back to the terminal by first copying the message with a STREAMS utility routine. Then CHARPROC uses another utility routine to obtain the address of its own write queue. Finally, the CHARPROC read put procedure uses another utility routine to call its write put procedure and pass it the message copy.
  #5  
Old 05-23-2002
Registered User
 

Join Date: Jan 2002
Location: India
Posts: 111
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
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0