Date: July 1, 2001
From: NoClue Hey NoClue
why do you always go on about SCSI? Do you have
scuzzyitis?
Yeah
I guess I do. SCSI rulez! In this post, Ill try to explain why.
What is SCSI?
quote:
SCSI, or Small Computer System Interface is a high speed, intelligent
peripheral I/O bus with a device independent protocol (from the Paralan SCSI FAQ)
Huh?
Okay
its an I/O bus (2-way pathway for data) that is high speed
(currently up to 160MB/sec, but 320MB/sec isnt far off), intelligent (it uses
things like disconnect/reconnect and it can pass data along the bus without pestering the
CPU) and device independent (it doesnt care what the device is, a hard drive,
a scanner, a printer, etc).
The SCSI bus consists of (at least):
- A Host Adapter Your SCSI card or onboard chip. Also called Host Bus
Adapter (HBA) or SCSI Controller. Ill usually refer to it as SCSI card in this post.
- A SCSI device this can be a hard drive, CD-ROM, CD-R/RW, DVD-ROM, optical
drive, tape drive, scanner, printer, etc.
- Cabling this can be internal or external
or both.
- Terminators these can be active or passive, they can be built into the
device or plugged into the bus. There must be 2 terminators on each bus
no more, no
less.
When dealing with SCSI devices, youre likely to hear terms like Fast SCSI, Ultra
SCSI, Ultra2 SCSI, Wide SCSI, etc. These various terms describe the amount of data that
can be passed through the SCSI bus. Well get into further detail later.
Why do I need to go SCSI? Isnt IDE/ATA okay?
Well
you dont necessarily. IDE/ATA is fine for many applications, especially on a machine with a single
hard drive.
Lets look at some of the Pros & Cons of both:
IDE/ATA
Pros:
- IDE/ATA is less expensive than SCSI. There is less development and testing required than
with a SCSI device, and therefore a much higher volume of IDE/ATA devices are produced.
- IDE/ATA is supported by the BIOSes on most motherboards. In most cases, the controller
is built-in.
- There is less overhead per command with IDE/ATA.
Cons:
- You are limited to 4 devices on most systems; or at most 8, with an additional
controller card.
- IDE/ATA devices are limited to disk drives, with some support for tape.
- IDE/ATA is single threaded. In other words, commands cannot overlap, even if you have a
second drive.
- IDE/ATA has limited support for DMA (Direct Memory Access where the drives
communicate directly with memory, bypassing the CPU). For those systems without DMA, the
CPU is involved in the transfer of all data, which prevents it from doing other tasks.
- With IDE/ATA and ATAPI there can sometimes be compatibility issues. There are drives
that will work fine when installed alone, but wont work when another drive is added.
These issues are rare, but they do happen.
- IDE/ATA devices do not handle scatter/gather operations very well.
SCSI:
Pros:
- Newer SCSI systems support up to 15 devices per bus (16 counting the controller)
- SCSI devices can be disk drives, tape drives, printers, scanners
almost any
peripheral device.
- With SCSI, all commands can overlap with commands on other devices.
- SCSI usually uses DMA to transfer data, thus freeing the CPU for other tasks.
- The largest, fastest devices come out as SCSI devices before IDE/ATA.
- Most SCSI cards can do scatter/gather DMA.
Cons:
- SCSI devices usually require more complex firmware and testing, and offer higher
performance. Thus SCSI is usually more expensive than IDE/ATA.
- SCSI is slightly more complicated to install than IDE/ATA.
Lets look at some of these points in further detail
Expense:
SCSI is more expensive than IDE/ATA
no doubt about it. Youll need to decide
if the extra performance is worth the extra expense.
If you plan to do data intensive (either CPU-intensive or storage-intensive) things
like digital video editing, you really dont have any choice; SCSI is the only way to
go.
Device Limitations:
Most IDE/ATA systems have 2 channels (Primary and Secondary), with up to 2 devices per
channel (Master and Slave), which offers you a maximum of 4 devices. These devices must be
internal, and are limited to drives (hard disks, CD-ROM/R/RW or DVD, ZIP/LS120, and a few
tape drives).
If you add a separate controller (such as an ATA-100 controller), you get an additional
channel, and 2 more devices.
SCSI can offer you up to 16 devices (the SCSI controller card counts as a device, so
its really 15 and a controller). Even Narrow SCSI offered you 8 (or 7 and a
controller). These devices can be internal or external and can be not only all of the
drives previously mentioned, but also printers, scanners, optical and magneto-optical
drives, etc.
Overlapping Commands and Connect/Disconnect:
IDE/ATA is a single-threaded architecture. This means that of the 2 drives on a given
channel, one will always be idle while the other is being read or written to. SCSI allows
devices to connect/disconnect at will, thereby sharing the bus more efficiently. In other
words, while one device is seeking or rewinding, another device can transfer its data.
IDE/ATA will not allow more than one I/O request per channel at a time, even to
different drives. SCSI allows up to 256 commands to be queued, and they can be completed
out of order. To quote from the Official comp.periphs.scsi FAQ at Gary Fields SCSI Info Central:
quote:
For instance, process 'A' needs to read a block. The request is sent to the drive,
the disk head starts to move, and process 'A' blocks waiting for it. Then, process 'B' is
allowed to run; it also reads a block from the disk. Process B's block may be sitting in a
RAM cache on the SCSI controller, or on the drive itself. Or the block may be closer to
the head than process A's block, or on a different drive on the same cable. SCSI allows
process B's request to be completed ahead of process A's, which means that process B can
be running sooner, so that the most expensive chip - the system CPU - tends to spend less
time twiddling its thumbs. Under ATA, the process B request cannot even be sent to the
drive until the process A request is complete. These SCSI capabilities are very valuable
in a true multi-tasking environment, especialy important in a busy file server, and
useless under DOS, which cannot take advantage of them.
I tend to hear from people, 'Well, I never use multitasking' because they never
actively run two programs at once - all but one are 'just sitting there'. Consider what
happens though, when you minimize a window which uncovers parts of four other application
windows. Each of those applications is sent a message telling it to update part of its
window; under win95, they will all run concurrently to perform the update. If they need to
access disk (usually because of virtual memory) the smoothness of the update can depend a
lot on the disk system's ability to respond to multiple independent read requests and
finish them all as quickly as possible; SCSI is better at this.
DMA and Scatter/Gather:
In modern operating systems (Windows, Unix, Linux, Netware, etc
pretty much
everything but DOS and Win3.x) the CPU can go off and do other processing while data is
transferred directly into memory using DMA. These operating systems also use what is known
as virtual memory
a space on your hard drive that the system uses as memory. In
virtual memory systems, a single 64KB chunk of data can be spread over up to 16 memory
pages. The term scatter/gather refers to what happens to the data during the DMA
operation. When data is read from a device, the sequence of bytes are scattered onto the
various memory pages. When data is written to the device, the data is gathered from the
various memory pages and organized into a sequence of bytes to be transferred to the
device.
A good SCSI card, given a single request, will handle this scatter/gather operation all
by itself. IDE/ATA must interrupt the CPU to handle this.
Ease of Installation:
IDE is slightly easier to install, the controller is usually built into the
motherboard, and all that is required is setting some jumpers for Master or Slave. SCSI
requires installing a controller card (usually, some mobos do come with built-in SCSI),
setting jumpers for the SCSI ID, and adding terminators
but as well see, this
stuff isnt very difficult either.
Okay
any more questions? 
Yeah
whats all this stuff about Wide/Narrow SCSI
or Ultra/Ultra2
SCSI
whats it all mean?
Glad you asked.
As the SCSI standard has evolved, the busses have gotten faster and wider. Theyve
gone from the old SCSI-1 at 8-bits wide and 5MB/sec to the
coming-soon-to-a-vendor-near-you Ultra320 SCSI at 16-bits wide and 320MB/sec.
The following table may help:
| SCSI Term |
Bus Speed in MB/sec. |
Bus Width in bits |
Max. Device Support |
| SCSI-1 |
5 |
8 |
8 |
| Fast SCSI |
10 |
8 |
8 |
| Fast Wide SCSI |
20 |
16 |
16 |
| Ultra SCSI |
20 |
8 |
8 |
| Wide Ultra SCSI |
40 |
16 |
16 |
| Ultra2 SCSI |
40 |
8 |
8 |
| Wide Ultra2 SCSI |
80 |
16 |
16 |
| Ultra160
SCSI |
160 |
16 |
16 |
| Ultra320 SCSI |
320 |
16 |
16 |
As you can see in the table, Narrow SCSI means 8-bits wide and support of up to 8
devices; Wide SCSI means 16-bits wide and support of up to 16 devices.
Narrow SCSI is said to contain the low byte, where Wide SCSI contains both the low
byte and the high byte. This will become more important as we discuss termination.
SCSI devices can be single-ended or differential. Single-ended means that
there is one wire for each signal that needs to be sent across the bus. Differential means
that there are two wires for each signal; the first wire carries the signal, the second
wire carries its logical inversion. The receiving device takes the difference between the
two (thus the name differential). Differential SCSI is less susceptible to noise,
allowing the bus to be longer.
Differential devices are further divided into HVD (High Voltage Differential)
and LVD (Low Voltage Differential). Before the new LVD interface was
designed, HVD was just called Differential, but the name has been changed to distinguish
it from LVD.
HVD devices could not exist on the same bus as single-ended (SE) devices. LVD devices
can switch into SE mode and co-exist with them. LVD also offers a high speed bus up to 12
meters in length. LVD devices have no on-board termination, so a separate terminator is
required.
I would be remiss if I didnt discuss the SCSI standards at this point (Thanks Bob
). Unfortunately this area is pretty
fuzzy, especially when dealing with vendors/sales staff. But, here goes
SCSI-1
SCSI-1 is a complete document that includes standards for all the physical and protocol
layers. The connectors used for SCSI-1 were the low-density 50-pin internal and external
connectors; the external connector is also called the Centronics connector. SCSI-1 is now
obsolete, according to the SCSI
Trade Association.
SCSI-2
Way back in 1985, when the SCSI (now SCSI-1) standard was still being hammered out, a
group started working on an extension of that standard, which became SCSI-2. SCSI-1,
unfortunately, did not bring about common compatibility between
manufacturers
different manufacturers added different undocumented
features to their devices. SCSI-2 addressed this problem while still assuring
backward compatibility for devices that were designed to the SCSI-1 spec. SCSI-2 is also a
complete document.
For more information about the differences between SCSI-1 and 2, check this
out.
SCSI-3
Where SCSI-1 and 2 were complete documents, SCSI-3 is a collection of documents
that cover the physical, protocol and command set layers. In most of these separate
documents, the 3 has been dropped
each document has its own revision
number.
For more information, see this.
The tricky part about the standards is that they have always lagged behind the real
world. Why did SCSI-1 end and SCSI-2 begin? Every once in a while, youve got to stop
and get a standard published.
If you stick to the terms endorsed by the SCSI Trade
Association when dealing with vendors, you have a better chance of getting what you
want.
SCSI is also different than IDE/ATA in that it requires each end of the bus be terminated.
What do you mean...terminated?
SCSI cables are basically transmission lines. Signals are bounced off of the ends and
reflected back to devices on the bus. Termination merely stops those signals from
bouncing back.
The key to termination is to remember that for each SCSI bus, there must be 2
terminators and there can only be 2 terminators
one at each end of the bus.
Drive letters, SCSI IDs, etc. dont matter
the terminators must be at the
physical ends of the SCSI bus.
Lets look at some examples:
Probably the simplest SCSI bus (shown above) is a single device (an internal hard
drive) connected to the SCSI card. In this example, both the card and the drive must be
terminated.
In this example, we have added an external device, a scanner. In other words, we have
moved the end of the bus from the card to the scanner. We will also need to move the
termination to the new end of the bus, so we will un-terminate the card and terminate the
scanner.
Now we have added 2 more hard drives and a printer. Again, we need to move the
termination to the physical ends of the bus. We will un-terminate the original hard drive
and the scanner, and terminate the new drive and the printer.
This can sometimes be confusing when compared to IDE/ATA. When setting up an IDE/ATA
drive, its location on the cable is unimportant
the Master/Slave settings are set
using jumpers on the drive.
When setting up a SCSI drive, you need to pay attention to cable locations, so
youll know where the bus should be terminated.
SCSI IDs, on the other hand, are set with jumpers on the drive, and like IDE/ATA,
location on the cable is unimportant (more on SCSI IDs later).
There is also some confusion about the way terminators effect the SCSI bus. I have
heard people say that they had added a device after the terminator, and were surprised
that the SCSI controller could still see the device. The effects of incorrect
termination are unpredictable, but you will normally see the device.
Termination can be tricky when dealing with wide vs. narrow devices (in fact,
connecting narrow devices to a wide bus can be tricky for a number of reasons). As we
discussed before, wide devices contain both the low byte and the high byte, where narrow
devices contain only the low byte. If you connect the narrow device to the end of your
wide bus (using a suitable adapter) and terminate it, the high byte will be left
un-terminated. In this case, youll need an adapter with high byte termination.
Termination Methods.
There are two types of terminators, Active and Passive.
Passive Terminators are a group of resistors that dampen reflected signals from
the ends of the bus. They rely on the TERMPWR (+5v) line from the cable for their power.
Active Terminators add a voltage regulator rather than relying on just the
TERMPWR line (which may or may not be exactly +5v).
If you are buying terminators, buy Active terminators. Anything other than single-ended
devices require them.
There are many different ways to terminate devices
jumper settings, software
settings, auto-termination, and plugging/unplugging terminators into/out of the individual
devices.
I usually try to get separate internal and external active terminators and place them
at the ends of the bus, disabling any on-board terminators or auto-termination. That way,
any internal devices can just be plugged into the cable, and if I add any external
devices, I just move the terminator. |