STREAMS
Encyclopedia
In computer networking, STREAMS is the native framework in Unix System V
UNIX System V
Unix System V, commonly abbreviated SysV , is one of the first commercial versions of the Unix operating system. It was originally developed by American Telephone & Telegraph and first released in 1983. Four major versions of System V were released, termed Releases 1, 2, 3 and 4...

 for implementing character devices.

STREAMS was designed as a modular architecture for implementing full-duplex I/O between kernel or user space processes and device drivers. Its most frequent uses have been in developing terminal I/O (line discipline
Line discipline
A line discipline is a layer in the terminal subsystem in some Unix-like systems. The terminal subsystem consists of three layers: the upper layer to provide the character device interface, the lower hardware driver to communicate with the hardware or pseudo terminal, and the middle line...

) and networking subsystems. In System V Release 4, the entire terminal interface was reimplemented using STREAMS. An important concept in STREAMS is the ability to push drivers — custom code modules that can modify the functionality of a network interface or other device — together to form a stack. Several of these drivers can be chained together in order.

History

STREAMS was first introduced in Eighth Edition Research Unix
Version 8 Unix
Eighth Edition Unix, also known as Version 8 Unix or V8, was a version of the Research Unix operating system developed and used internally at Bell Labs and a select number of universities. It was "released" in February 1985, ran on VAX hardware, and was a variant of 4.1cBSD with some System V.1 ...

 by Dennis Ritchie
Dennis Ritchie
Dennis MacAlistair Ritchie , was an American computer scientist who "helped shape the digital era." He created the C programming language and, with long-time colleague Ken Thompson, the UNIX operating system...

, where it was used for the terminal I/O
Input/output
In computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...

 subsystem and the TCP/IP protocol. This version fit the new functionality under the existing device I/O system calls (open, close, read, write, and ioctl), and its application was limited to terminal I/O and protocols providing pipe-like I/O semantics. It was ported to System V Release 3 by Robert Israel, Gil McGrath, Dave Olander, Her-Daw Che, and Maury Bach as part of a wider framework intended to support a variety of transport protocols, including TCP/IP, ISO Class 4 transport, SNA LU 6.2, and the AT&T NPACK protocol (used in RFS
Remote File System
The Remote File System was a distributed file system developed by AT&T in the 1980s. It was first delivered with UNIX System V Release 3 .Compared to NFS it made quite different design decisions...

). It was first released with the Network Support Utilities (NSU) package of UNIX System V Release 3. This port added the putmsg, getmsg, and poll system call
System call
In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware related services , creating and executing new processes, and communicating with integral kernel services...

s, which are nearly equivalent to the send, recv, and select
Select (Unix)
select is a system call and application programming interface in Unix-like and POSIX-compliant operating systems for examining the status of file descriptors of open input/output channels...

calls from Berkeley sockets. The putmsg and getmsg system calls were originally called send and recv, but were renamed to avoid namespace conflict. In System V Release 4, STREAMS was extended and used for the terminal I/O framework and pipes, providing useful new functionality like bi-directional pipes and file descriptor
File descriptor
In computer programming, a file descriptor is an abstract indicator for accessing a file. The term is generally used in POSIX operating systems...

 passing. A port for Unicos
Unicos
UNICOS is the name of a range of Unix-like operating system variants developed by Cray for its supercomputers. UNICOS is the successor of the Cray Operating System . It provides network clustering and source code compatibility layers for some other Unixes. UNICOS was originally introduced in 1985...

 was also produced.

Concurrent with the System V Release 3 port, AT&T
AT&T
AT&T Inc. is an American multinational telecommunications corporation headquartered in Whitacre Tower, Dallas, Texas, United States. It is the largest provider of mobile telephony and fixed telephony in the United States, and is also a provider of broadband and subscription television services...

 developed protocol-independent STREAMS message passing guidelines for the link
Link Layer
In computer networking, the link layer is the lowest layer in the Internet Protocol Suite , the networking architecture of the Internet . It is the group of methods or protocols that only operate on a host's link...

, network
Network layer
The network layer is layer 3 of the seven-layer OSI model of computer networking.The network layer is responsible for packet forwarding including routing through intermediate routers, whereas the data link layer is responsible for media access control, flow control and error checking.The network...

, and transport layer
Transport layer
In computer networking, the transport layer or layer 4 provides end-to-end communication services for applications within a layered architecture of network components and protocols...

s of the OSI model
OSI model
The Open Systems Interconnection model is a product of the Open Systems Interconnection effort at the International Organization for Standardization. It is a prescription of characterizing and standardizing the functions of a communications system in terms of abstraction layers. Similar...

 (layers 2-4). Due to the typically close implementation coupling of the network and transport protocols in a given protocol stack
Protocol stack
The protocol stack is an implementation of a computer networking protocol suite. The terms are often used interchangeably. Strictly speaking, the suite is the definition of the protocols, and the stack is the software implementation of them....

, and the typical practice of implementing layers 5-7 outside of the kernel, only the link
Link Layer
In computer networking, the link layer is the lowest layer in the Internet Protocol Suite , the networking architecture of the Internet . It is the group of methods or protocols that only operate on a host's link...

 and transport layer
Transport layer
In computer networking, the transport layer or layer 4 provides end-to-end communication services for applications within a layered architecture of network components and protocols...

 STREAMS service interfaces were later standardized by X/Open
X/Open
X/Open Company, Ltd. was a consortium founded by several European UNIX systems manufacturers in 1984 to identify and promote open standards in the field of information technology. More specifically, the original aim was to define a single specification for operating systems derived from UNIX, to...

. In conjunction with the transport message passing model, the Transport Layer Interface
Transport Layer Interface
In computer networking, the Transport Layer Interface was the networking API provided by AT&T UNIX System V Release 3 in 1987 and continued into Release 4 . TLI was the System V counterpart to the BSD sockets programming interface, which was also provided in UNIX System V Release 4...

 (later adopted as the X/Open Transport Interface
X/Open Transport Interface
The X/Open Transport Interface is an Open Group specification for network application programming present in UNIX System V operating systems. It provides OSI Transport Layer services with protocol independence...

) was defined to provide a transport protocol-independent API for application development. Also, a library supporting the session
Session layer
The session layer is layer 5 of the seven-layer OSI model of computer networking.The session layer provides the mechanism for opening, closing and managing a session between end-user application processes, i.e., a semi-permanent dialogue. Communication sessions consist of requests and responses...

, presentation
Presentation layer
The presentation layer is layer 6 of the seven-layer OSI model of computer networking and serves as the data translator for the network. It is sometimes called the syntax layer.-Description:...

 and application layer
Application layer
The Internet protocol suite and the Open Systems Interconnection model of computer networking each specify a group of protocols and methods identified by the name application layer....

s was defined and later standardized by The Open Group
The Open Group
The Open Group is a vendor and technology-neutral industry consortium, currently with over three hundred member organizations. It was formed in 1996 when X/Open merged with the Open Software Foundation...

.

STREAMS was required for conformance with the Single UNIX Specification
Single UNIX Specification
The Single UNIX Specification is the collective name of a family of standards for computer operating systems to qualify for the name "Unix"...

 versions 1 (UNIX 95) and 2 (UNIX 98), but as a result of the refusal of the BSD and Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 developers to provide STREAMS, was marked as optional for POSIX compliance by the Austin Group in version 3 (UNIX 03).

Implementations

STREAMS has mostly been used in the System V Unix world; however, other implementations exist:
  • Plan 9
    Plan 9 from Bell Labs
    Plan 9 from Bell Labs is a distributed operating system. It was developed primarily for research purposes as the successor to Unix by the Computing Sciences Research Center at Bell Labs between the mid-1980s and 2002...

     originally used a multi-processor variant of Research Unix's Streams. During the transition to the third edition of Plan 9, Streams were further simplified to simple I/O queues.
  • Mentat wrote an implementation of STREAMS.
    • Novell
      Novell
      Novell, Inc. is a multinational software and services company. It is a wholly owned subsidiary of The Attachmate Group. It specializes in network operating systems, such as Novell NetWare; systems management solutions, such as Novell ZENworks; and collaboration solutions, such as Novell Groupwise...

       Netware utilizes Mentat's STREAMS in its TCP/IP stack.
    • This was licensed by Apple Computer
      Apple Computer
      Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

       for use in Mac OS
      Mac OS
      Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

       starting in version 7.5.2, as part of their Open Transport
      Open Transport
      Open Transport was the name given by Apple Inc. to their implementation of the Unix-originated System V STREAMS. Based on code licensed from Mentat's Portable Streams product, Open Transport was built to provide the Mac OS with a modern TCP/IP implementation, replacing MacTCP...

       networking system.
      • In Mac OS X
        Mac OS X
        Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

        , the Classic environment uses the STREAMS architecture, but the native networking architecture is essentially Berkeley sockets
        Berkeley sockets
        The Berkeley sockets application programming interface comprises a library for developing applications in the C programming language that perform inter-process communication, most commonly for communications across a computer network....

        .
  • The Linux kernel
    Linux kernel
    The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software....

     does not include STREAMS functionality. The kernel developers consider it technically inadequate, and the compatibility layer
    Compatibility layer
    A compatibility layer is a term that refers to components that allow for non-native support of components.In software engineering, a compatibility layer allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system...

    s in Linux for other operating systems convert STREAMS operations into sockets as early as possible .
    • LiS (Linux STREAMS) adds STREAMS functionality on Linux
    • OpenSS7 offers Fast STREAMS on Linux.
  • FreeBSD
    FreeBSD
    FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

     has basic support for STREAMS-related system calls, as required by SVR4 binary compatibility layer.
  • The Windows NT
    Windows NT
    Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

     kernel offered a full port of STREAMS as the streams.sys binary. NT DDK even had a chapter on STREAMS, going as late as NT4 though in NT4 DDK it was declared obsolete.
    • It is sometimes claimed that an early port of TCP/IP for Windows NT
      Windows NT
      Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

      by Lachman Associates (?) included a full implementation of the System V.3 STREAMS model. It was really implemented based on STREAMS, and used the streams.sys binary. From NT 3.5 (? or 3.51) up, TCP/IP was remade completely, according to some sources, by adopting the one from MS LAN Manager for OS/2 1.x

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK