0% found this document useful (0 votes)
96 views6 pages

Full-Duplex Communication in STREAMS

Streams provide a framework for modular device drivers and network protocols. A stream consists of a head that interfaces with a user process, a driver end that interfaces with a device, and optional modules in between. Modules contain read and write queues that communicate via message passing. Modules are added via ioctl calls to provide functionality like processing. Streams benefit performance by reducing context switches and data copying between kernels and applications.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views6 pages

Full-Duplex Communication in STREAMS

Streams provide a framework for modular device drivers and network protocols. A stream consists of a head that interfaces with a user process, a driver end that interfaces with a device, and optional modules in between. Modules contain read and write queues that communicate via message passing. Modules are added via ioctl calls to provide functionality like processing. Streams benefit performance by reducing context switches and data copying between kernels and applications.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

STREAMS

 STREAM – a full-duplex communication channel between


a user-level process and a device driver.
 A STREAM consists of:
- STREAM head interfaces with the user process
- driver end interfaces with the device
- zero or more STREAM modules between them.
 Each module contains pair of queues a read queue and a
write queue.
 Message passing is used to communicate( transfer data)
between queues.
 Modules provide the functionality of STREAMS processing
and they are pushed onto a stream using the ioctl ()
system call.
 Benefit:
 It provides a framework to a modular and incremental
approach to writing device drivers and network protocols.
The STREAMS Structure
Performance

 I/O is a major factor in system performance:

 Demands CPU to execute device driver, kernel I/O code


 Context switches due to interrupts
 Data copying between controllers and physical memory ,
and again during data copy between kernel buffers and
application data space.
 Network traffic especially stressful
Intercomputer Communications
Improving Performance

 Reduce number of context switches


 Reduce the number of times that data must be copied in
memory while passing between device and application.
 Reduce the frequency of interrupts by using large
transfers, smart controllers, polling
 Increased concurrency by using DMA
 Balance CPU, memory, bus, and I/O performance for
highest throughput
Device-Functionality Progression

You might also like