Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesSCSI And Beyond


August 1994 / State Of The Art / SCSI And Beyond

The old standby for connecting peripherals to Macintosh and DOS computers is more important--and more capable--than ever as it rises to the multimedia challenge

Dinah Mcnutt

Of all the peripheral ``buses'' in common use today, SCSI has been around nearly the longest--and yet its future is still bright. First popularized on Apple's Macintosh in 1984, SCSI is now widely used in IBM PC-compatible systems--its acceptance hastened by the rapid growth of multimedia. SCSI is the standard interface for CD-ROM drives, and several popular sound cards now incorporate a SCSI connection. But most SCSI products still use the original SCSI-1 standard, finalized in 1986.

Although SCSI-1's immediate successor, SCSI-2, has been in the works for years, as of this writing, it has not yet been adopted as an official standard; how ever, it is generally accepted and is in wide use. SCSI-2 had its genesis when many manufacturers wanted to increase the number of mandatory requirements of SCSI and to define further features for direct-access devices. A committee was formed to pursue this independently of SCSI-1, so the standard wouldn't be delayed. What resulted was the CCS (Common Command Set), which defines a set of commands that a device must support to be considered compatible with the SCSI specification. The developing specification for SCSI-3 is well under way, but it probably won't be adopted until late 1995 or 1996. (Note: From now on, the acronym SCSI refers to the SCSI-1 and SCSI-2 specifications, unless otherwise specified.)

SCSI is an 8-bit parallel I/O bus. What makes it special is that it hides the internal structure of the peripherals from the host computer. Up to eight SCSI devices can be attached to a single SCSI bus. (One of these devices is the host adapter.) However, only one pair of devices can communicate at a time. SCSI uses a 3-bit addressing scheme, where each device is assigned an address ranging from 0 to 7; device 7 has the highest priority, and the host computer is normally assigned as device 7. Communication between devices occurs when the initiator, which is typically the host computer, originates a request, and the target (e.g., a device controller) performs the request.

The SCSI standard lets all devices communicate with one another. But some devices are implemented in such a way that they cannot initiate communication. There are four distinct configurations in a SCSI I/O system:

-- single initiator, single target

-- single initiator, multiple targets

-- multiple initiators, single target

-- multiple initiators, multiple targets

Some devices can act as either initiator or target, while others have a fixed role as one or the other. Theoretically, it is possible to have more than one host on a SCSI bus, providing that the operating systems on both hosts share the device or that you let only one host have exclusive use of the device at a time.

The SCSI specification groups devices into related types, which makes it easy for hardware vendors to develop SCSI bus controllers for new devices. Currently available device types include the following:

-- direct-access drives (e.g., hard drives)

-- sequential-access devices (e.g., tape drives)

-- printer devices

-- processor devices

-- WORM devices

-- read-only, direct-access devices

Therefore, there's no need to develop a new device driver for the host computer to handle each new device. For instance, the SCSI disk driver on a typical Unix system will work with almost every SCSI hard drive. The only exception to this occurs when a vendor adds new commands that are outside the SCSI specifications. The standard allows for this, because sometimes performance or functionality requirements make it necessary to use SCSI hardware and software in ways that don't strictly conform to the specification.

There are two different electrical specifications for SCSI: single-ended and differential. Single-ended SCSI uses one line for each signal, with all lines using a common ground reference. This approach lets you use less expensive hardware. One disadvantage of single-ended SCSI is its vulnerability to noise, because all lines share the same ground reference. Also, it is limited to a maximum cable length of 6 meters.

Differential SCSI distinguishes actual signals from noise by using two lines, one carrying a positive signal and the other a negative. Any noise will affect both lines in the same direction, so the voltage difference remains the same. It also supports cables of up to 25 meters in length. Differential SCSI devices are much more expensive to design and manufacture, because they require twice as many pins and chips. Thus, single-ended SCSI is most common today. Some vendors sell a converter that lets you use differential SCSI devices on a single-ended SCSI bus.

SCSI devices can use either asynchronous or synchronous protocols for communication. The asynchronous protocol uses a traditional REQ/ACK handshake. The synchronous protocol allows the device to issue several REQs before receiving an ACK; this can increase the transfer speed by a factor of three. In the original SCSI specification, synchronous communication allowed speeds of up to 5 MBps. Note that if your SCSI bus is short, asynchronous communication can be fast.

SCSI-2

After the initial use of SCSI products pointed out areas for improvement, a SCSI-2 standard was developed to allow more flexibility and higher performance. SCSI-2 extends the original CCS specification to include support for devices such as CD-ROMs, scanners, communications devices, and optical memory drives (e.g., WORM and erasable media.)

SCSI-2 supports a faster, wider bus than the original. In addition to the standard 8-bit SCSI bus, you can have 16- or 32-bit buses. SCSI-2 provides for speeds of 10 MBps on the 8-bit bus, which means you can get up to 40 MBps on the 32-bit bus. SCSI-2 implementations that support the 10-MBps speed are called fast SCSI. Implementations that use the 16- or 32-bit bus are called wide SCSI. You may also find SCSI-2 with both (i.e., fast and wide SCSI) or neither (i.e., the slow and narrow 5-MBps 8-bit bus). The SCSI-2 specification allows fast SCSI only on differential SCSI buses, but in practice, vendors sell single-ended fast SCSI devices. SCSI-2 offers a specification for smaller, denser connectors for use with smaller devices.

SCSI-3

While SCSI-2 makes its way through the standards-acceptance process, work has already begun on its successor, the SCSI-3 specification, which will address some of SCSI-2's limitations. Plans include support for optical fiber, longer cables, and more than eight targets per bus. It will also be faster than the SCSI-2 bus, running at 20 MBps.

Although SCSI has thus far been a parallel interface, a proposal for serial SCSI is included as part of SCSI-3. Serial SCSI will involve using fiber-optic or high-speed copper, similar to the way FDDI (Fiber Distributed Data Interface) or ATM (asynchronous transfer mode) does. The current proposals include speeds ranging from 51 Mbps to 1 Gbps. The serious serial proposals are IEEE P1394, Fibre Channel, and SSA (Serial Storage Architecture).

In addition to the high speeds of these new proposals, serial cable lets you use fewer wires, which simplifies cabling. SCSI-3 supports older-style cabling, but the new cabling specifications will provide a challenge for the initial implementations, especially if you want to mix SCSI-2 and SCSI-3 devices on the same bus.

My sources tell me not to expect SCSI-3 to become adopted until there are products on the market using the draft specifications. This is what happened with SCSI-2. It has become a de facto standard because of the number of products available. (The problems with getting it adopted seem to be primarily political, not technical or economical.) My sources also tell me to expect a CAM (common access method) specification to be included in SCSI-3; this should simplify programming for these devices.

Termination

The SCSI bus must be terminated on both ends. Where all SCSI devices are external, the host adapter provides termination on one end, while an external terminator is usually attached to the last device on the external chain. However, if there is a mixture of internal and external devices, the host adapter is in the middle of the physical chain and must not be terminated. You should use the same terminator on both ends of the bus. Three types of termination can be used after the last device on the SCSI bus:

-- Passive termination consists of resistors only.

-- FPT (forced perfect termination) uses diode clamps to eliminate overshoot and undershoot.

-- Active termination (only for SCSI-2) uses a voltage regulator to ensure that the SCSI signals are always terminated to the correct voltage level.

Passive termination is adequate for short dist ances (i.e., 2 to 3 feet), but active termination is desirable if you are near the maximum bus length. The SCSI specification recommends active termination, but in practice, passive termination and FPT are most common, simply because they are less expensive.

Configuring SCSI Devices

Unlike traditional buses--such as DEC's Unibus, the VMEbus, or the PCI (Peripheral Component Interconnect)--SCSI is rarely implemented as a card cage with card slots. SCSI devices can be, and often are, external to the computer and daisy chained together with cables. Therefore, each SCSI device enclosure has two connectors: one for input and one for output. (An enclosure may contain more than one SCSI device.)

On most devices, it doesn't matter which cable you connect to which port, but it's a good idea to check the documentation for any particular piece of equipment, in case it is different. The bus must be terminated, either by placing a terminator on the output port of the last device on the bus or by choosing as the last device a SCSI peripheral that has an internal terminator.

Each device on the SCSI bus must have a different address, ranging from 0 to 7. Most SCSI devices have an external thumbwheel or switch that allows you to easily view and change the SCSI address.

Traditional Microcomputer Interfaces

To appreciate the specific advantages of SCSI, it helps to look at its primary competitors. The most popular type of storage device interface for PCs has been ATA (AT attachment), a specific type of IDE drive. Because of its popularity, ATA is often used interchangeably (and incorrectly) as IDE. Properly speaking, the acronym IDE refers to any drive with a built-in drive controller.

The ATA interface is simple, requiring only a signal cable and a power cable. Data transfer has a low overhead (1 to 2 milliseconds per command) and is 16 bits wide.

As with SCSI, there is the original specification (ATA-1) and two successors. ATA-1 is still in the process of being adopted as a standard . ATA-2 adds more advanced data transfer modes and speeds of up to 16.6 MBps. ATA-3 is a proposal to merge the ATA Packet Interface, which Western Digital and several CD-ROM vendors developed, with ATA-2.

With a single-tasking operating system, an ATA drive will typically outperform an otherwise-identical SCSI drive, because of the overhead of the SCSI bus. In a multitasking environment, however, the SCSI drive will outperform the IDE drive because it lets you make multiple requests to multiple devices at the same time.

At the moment, an ATA drive is less expensive than a SCSI drive. Once you have added a SCSI adapter, however, the incremental cost of adding a SCSI device becomes competitive. This is because a SCSI adapter can connect to as many as six devices, while the ATA interface supports only two. Also, until quite recently, the only type of peripheral device that ATA supported was a hard drive.

Driving Miss Daisy Chain

On most Unix systems, the operating system already has all t he drivers you are likely to need for most SCSI devices, and there is a wide variety of vendors and hardware to choose from. On IBM PC compatibles, however, things are quite different. To use a SCSI adapter, you may need to obtain device drivers for each of the different devices you wish to connect to your PC. Most vendors of SCSI adapters will provide these.

To ease the job of writing new device drivers, a proposed standard called CAM encapsulates the SCSI functions into a standardized calling interface. CAM is not currently a part of the SCSI specification, but it may be included as part of SCSI-3. More advanced PC operating systems (e.g., OS/2 2.1 and higher and Windows NT) support CAM.

At present, the de facto standard for creating device drivers is ASPI (advanced SCSI programming interface). This was originally developed by Adaptec, and a number of other vendors have adopted it. By using one of these standards (or a CAM-to-ASPI converter, which is what Future Domain of Irvine, California, does), vendors can provide device drivers for new hardware much more quickly. In addition, vendors are working on other tools to make it easier to install SCSI devices. In the future, you can expect SCSI devices to configure automatically and load their own drivers. The irony is that SCSI gets easier to deploy the more competent it becomes.

BIBLIOGRAPHY

Mueller, Scott. Upgrading and Repairing PCs, 3d ed., Que Corp.,

Indianapolis, IN, 1993.

Rosch, Winn L. The Winn L. Rosch Hardware Bible, 3d ed., Brady Publishing,

Indianapolis, IN, 1994.

Another reference is the FAQ (frequently asked questions) list from the Usenet newsgroup comp.periphs.scsi. Gary Field currently maintains this list, and it is available via anonymous FTP from cs.columbia.edu in the file /archives/mirror2/faq/comp.periphs.scsi.

On-line SCSI-3 specifications are available from ncrinfo.ncr.com:/pub/standards and ftp.netcom.com:/pub/standards. A full set of specifications is available from Global Engine ering Documents, 15 Inverness Way E, Englewood, CO 80112, (800) 854-7179.

ACKNOWLEDGMENTS

My thanks to Michael Pearlman of Rice University for once again reading one of my articles and answering endless questions. Also, thanks go to Dave Olson at Silicon Graphics; Carl Chesbrough (Wind River Systems); Jeff Stai (Western Digital); Charles Sommerhauser and Kellie DiNaro (Walt & Sommerhauser); and Jeff Taylor (BusLogic) for their expertise.


Dinah McNutt is a systems administration consultant and founder of Zilker Internet Park in Austin, Texas. You can contact her on the Internet at dinah@zilker.net or on BIX c/o ``editors.''

Up to the State Of The Art section contentsGo to previous article: Back Of The BusGo to next article: Purchasing Hints, Troubleshooting TipsSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network