Click here for the HP 1100A

PC Magazine

  PC Tech

SCSI Just Keeps On Rolling

Introduction

SCSI Flavors

Targets and LUNs

How SCSI Works

And More. . .

Figure 1



Click here for Wintec Direct!

NextCard Internet Visa - Apply Now

 
  Categories:
PCs and Hardware
SCSI Just Keeps On Rolling
How SCSI Works

Continued from Targets and LUNs

The SCSI bus requires termination at both ends. Typically, the host adapter is one end of the chain, and the final device on the SCSI cable is the other. Terminating means leaving a resistor connected on the circuit board (which is often a matter of leaving a jumper in place). If you have an adapter and only one device (a CD-ROM drive, for instance), termination is easy: The resistors are in place with each SCSI unit as it ships, so you don't have to do anything. As you add devices to the bus, however, you must remove the terminator from all but the first and last one. This gets a bit more complex when you combine external and internal SCSI devices. A host adapter card typically has an external port that lets you attach devices such as a scanner or an external CD-ROM drive (see Figure 1). As long as you have only one device attached, you have no problem: The host adapter forms one end of the bus, and the external device forms the other. But if you have at least one internal device on the bus, you must remove the terminating resistor (terminator) from the adapter itself, allowing the last internal device to form one end and the external device to form the other. The bus must contain two terminators but no more than two.

Each SCSI unit on the bus can take control of the bus, as an initiator, by transmitting control signals (commands) aimed at a specific target. When SCSI was introduced, only one command per logical unit could be sent at a time, but SCSI-2 introduced command queuing, in which up to 256 commands per initiator can be queued for each logical unit. Furthermore, the target's controller is able to analyze the queue and change the sequence for greatest efficiency. One of the essentials of SCSI design is that initiating devices should use the SCSI bus only for transmitting commands and data, leaving the bus free for other devices whenever data is not being transferred. If a command is cached on the target controller, for instance, and pertains only to that target controller, the controller won't use the bus at all until there's a need to transfer something. This system requires careful coordination of commands and transfers; hence the importance of increasing intelligence in the controllers.

The transfer of data or control signals over the SCSI bus takes place in eight phases. The first is the bus-free phase, where the initiator determines that the bus isn't under the control of another SCSI device. In the next phase, arbitration, the initiator sends a control signal to set the bus into a busy state and sends its own ID number out to the bus, effectively stating that it wishes to take control. A short delay then occurs, during which other devices can send the same signal and the bus arbitrates, giving the device with the highest ID number the go-ahead. If no other device asks for the bus, or if the original initiator has the highest ID number, then the original initiator controls it.

Once the device has the bus under its control, the process enters the selection phase, possibly followed by the reselection phase. In the former, the initiating device specifies a target unit and sends that unit one or more commands. Commonly the device might tell a hard disk to read or write data. When the target receives the command, it sends its ID number onto the bus so that both devices are active. Since only two devices can be active at any given time, the bus becomes unavailable to any other unit. The target recognizes the initiator by its ID number, and the controller stores this information in case of a lost connection between the two. A lost connection can result from an error, but in the case of reading and writing data, the lost connection can also be intended: During drive access (which takes some time), the target releases the SCSI bus so that other transactions can occur. Once the target has completed the command, it enters the reselection phase, during which it recalls the initiator's ID number and essentially repeats the bus-free, arbitration, and selection phases to reestablish contact.

The final four stages are command, data, message, and status. During these stages, the target receives commands from the initiator, and the two exchange data and, if necessary, messages concerning the connection and status information about each other. Once the purpose of the connection has been fulfilled, the initiator sends a reset control signal and the bus is returned to a bus-free state, ready for other transactions. Note that the CPU doesn't get involved with any phase in the process: Its only interaction is with the host adapter, and only when actual CPU cycles are required.

Next: And More. . .

Published as Tutor in the 3/10/98 issue of PC Magazine.


 SPONSORED LINKS
@Backup   Your Solid Online Backup Plan. Download Now.
Services   9c/MINUTE LONG DISTANCE, 5c/MINUTE ON SUNDAYS!
STORAGE   Quantum means non-stop business, 24 hours a day
Software   X10.com -- The SuperSite for Home Automation
Books   Bargain Books up to 90% off at barnesandnoble.com
 ZDNET FEATURED LINKS
Downloads   Check out the best new downloads in Reviewer's Raves
Bargains!   Shop the Basement for best buys on computer products
Free Help   Got computing questions? ZDHelp has all the answers!
 MAGAZINE OFFERS
Free Offer   Get a FREE SUBSCRIPTION to Inter@ctive Week

TOP
Copyright (c) 1998 Ziff-Davis Inc.