![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to cp files to dir,using routine? | wrapster | Shell Programming and Scripting | 4 | 05-21-2008 11:41 PM |
| how to cp files to dir,using routine? | wrapster | UNIX for Advanced & Expert Users | 1 | 05-21-2008 03:18 PM |
| Gnuplot question: how to plot 3D points as colored points in map view? | karman | UNIX and Linux Applications | 0 | 09-24-2007 08:03 AM |
| sub routine call | sekar sundaram | Shell Programming and Scripting | 2 | 11-10-2005 08:30 PM |
| Need basic disk copy routine for AIX 3 | tekmeister | AIX | 0 | 09-30-2005 12:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
I do understand that Perderabo. I am working on SCO ver 5.05. SCO has following device driver entry points : close , halt , init , intr , ioctl , open , pminit , poll , print , probe , proc , read , start , strategy , write. Appologies if I am wrong.
I would like reframe my question again : a)What is the full extension for the kernel resource structure 'bdevsw' and 'cdevsw' . Is it block or charcter device software table or just pronounced as 'bdevsw' and 'cdevsw'. b)In a streams device driver is it that the all the modules in the driver read and write queue has its own read and write queues. Modules communicate with each other with respect to their read or wirte queues but are confied to the driver's read or write queue modules only. For elaborating my idea I put forward a virtual visual diagram. The pair of driver's read and write queues can be imagined as a pair of set of train tracks.Modules can be thaught as stations capable of doing some processing. It is not necessary that number of modules in write queue be the same in read queue of the driver.The module in the driver write queue can refer to its read/write queue but it cannot refer to the read or write queue's of any module in read queue of the driver.If you are abel to get the picture,is my opinion correct ? Thanks in advance for all technical helps. Thanks in advance. |
|
|||||
|
I'll have to take your word for the list of entry points on SCO. It is a longer list than I used to seeing, but I haven't looked at many kernels.
You seem to asking how to verbally pronounce bdevsw and cdevsw. Gosh, I don't know. They're simply variable names. It never occurred to me to attempt to speak them nor have I ever heard anyone else try. It's obvious that the names come from "block device switch" and "character device switch". I hereby opine that the correct pronuciation is "bee dev switch" and "see dev switch" where "dev is pronounced like the first syllable of "devil". But I just made that up. I am not really a Streams expert, but I *think* that your picture is wrong. First, I think that the modules on the read and write queues do indeed need to match. And in fact I think of it as a single module that simply handles both queues. I'd be a little surprised if I have this wrong. Second, I am not sure if modules can peek at the queues of other modules or not. The case that has me worried is the need for exceptional processing for flow control. For example, in a tty driver driver, you may need to write an X-off character as soon as the read queues downstream start to back up. I am not at all sure about this, though. |
|
||||
|
When the UNIX operating system goes to process the open system call, it internally finds out the major number of the file.It uses the major number to index into a table of all of the character drivers installed ( if the file is a character special file ).The declaration within the table contains information in the structure "see dev switch" which has a member variable of type pointer to struct streamtab. The said variable is supposed to contain info about the read and write queues in type structure struct qinit format.The read queue need not have the put procedure while the write need not have open and close procedure.
I am bit confused at this junction. If the read and write queue has different entry points .... the modules on the read and write queues are not matching ? When we insert a module into the stream it is inserted just after the head and modules will be poped out in LIFO way. I am unable to get the full picture clear, the basic being how does the entry points modules linked to the read and write queue and as to how the picture looks like when modules are inserted. Further more where in the picture the "read/write services" fits in with respect to queues? I know I would be sounding a bit foolish but I need to clear all my doubts at elementary level. Thanks in advance for all your help. |
|
|||||
|
The stream head module has entry points for read, write, open, close, select, and ioctl. These entry points get placed in the cdevsw table and they are called pretty much like any other driver. In the case read and write, the data is coming from or going to buffers in the invoking process. The queue structures are not directly visable to the system calls. The stream head has the job of moving data between the queues and the user's buffers. It also does whatever else it takes to make the stream look like a device driver. This includes error checking the user's parameters and possibly setting errno. In the case a severe user error, it may not even look at the queue structures. Those queue structures are used for module to module communication.
|
|
||||
|
Perderabo , as you say "The stream head module has entry points for read, write, open, close, select, and ioctl." , I just cannot figure it out then why,as I have stated "The declaration within the table contains information in the structure "see dev switch" has a member variable of type pointer to struct streamtab. The said variable is supposed to contain info about the read and write queues in type structure struct qinit format.The read queue need not have the put procedure while the write need not have open and close procedure. ", in my earlier posting, that why at all a read or write queue should be initialized if the stream head module has all the entry points ?
Thanks in advance for all help. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|