[comp.periphs.scsi] SCSI 2 Command Queing

jt34@prism.gatech.EDU (THOMPSON,JOHN C) (06/13/91)

Excuse me if i posted a similar question but I wasn't sure if I phrased it
correctly so I will try again.
SCSI 2 supports tagged command queing which I think means that the host may
send multiple command requests to the same device. Do most multitasking OSs
allow this? Say for example in an UNIX environment that task 1 made a request
to disk 1 and before this request is completed task 2 makes a seperate request
of the same disk 1. Will the OS wait until task 1's request is completed or
with scsi 2 will the OS go ahead and immdeiately send the second request so that
the two requests are being serviced simultaneously. I think scsi 2 allows this
however many OSs and device drivers may not yet support this. Does anyone
know if this is true? Will device drivers need to rewritten for scsi 2 or
can a controller take care of this? A controller can only forward requests it
receives and if the OS won't send more than one at a time you're sunk.
-- 
THOMPSON,JOHN C
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!jt34
Internet: jt34@prism.gatech.edu

steve@nuchat.sccsi.com (Steve Nuchia) (06/15/91)

In <31293@hydra.gatech.EDU> jt34@prism.gatech.EDU (THOMPSON,JOHN C) writes:
>SCSI 2 supports tagged command queing which I think means that the host may
>send multiple command requests to the same device. Do most multitasking OSs
>allow this? Say for example in an UNIX environment that task 1 made a request

I have no idea how to answer for "most" OSs.  For Unix the answer is
a qualified "of course".  All you need is a driver that knows that
the hardware can handle it.  The normal disk drivers (block device drivers)
all have software queueing of requests.  The "elevator" sort is performed
on the contents of this queue, and one entry is sent out whenever the
controller is ready.  The driver would have to be restructured to do
it, but it certainly can be done.  Of course, no such drivers exist in
the PC Unix world today.


-- 
Steve Nuchia	      South Coast Computing Services      (713) 964-2462
	"Innocence is a splendid thing, only it has the misfortune
	 not to keep very well and to be easily misled."
	    --- Immanuel Kant,  Groundwork of the Metaphysic of Morals

neese@adaptx1.UUCP (06/16/91)

>/* ---------- "SCSI 2 Command Queing" ---------- */
>Excuse me if i posted a similar question but I wasn't sure if I phrased it
>correctly so I will try again.
>SCSI 2 supports tagged command queing which I think means that the host may
>send multiple command requests to the same device. Do most multitasking OSs
>allow this?
>Say for example in an UNIX environment that task 1 made a request
>to disk 1 and before this request is completed task 2 makes a seperate request
>of the same disk 1. Will the OS wait until task 1's request is completed or
>with scsi 2 will the OS go ahead and immdeiately send the second request so
>the two requests are being serviced simultaneously. I think scsi 2 allows this
>however many OSs and device drivers may not yet support this. Does anyone
>know if this is true? Will device drivers need to rewritten for scsi 2 or
>can a controller take care of this? A controller can only forward requests it
>receives and if the OS won't send more than one at a time you're sunk.

An OS, such as UNIX, allows it (I beleive Novelle 386 also).  But the driver
must be structured to do it also.  Many of the drivers written for the 1542
have been single-threaded to each device.  That is, the driver would only allow
one command at a time on a per target basis, but would allow another command
to be started on another device without waiting for the other target to
complete a command.  I haven't seen a driver that didn't allow overlapped
I/O operations for UNIX.  And this is not specific to SCSI-2.  SCSI, from the
original ANSI spec has allowed this type of operation.

Tag queuing requires the driver/adapter to know how to do it, and who it can be
done with.  There are specific messages the driver/adapter must know about and
make provisions for.  It is not something that could be made transparent (at
least very easily) to the driver.

			Roy Neese
			Adaptec Senior SCSI Applications Engineer
			UUCP @  neese@adaptex
				uunet!cs.utexas.edu!utacfd!merch!adaptex!neese

neese@adaptx1.UUCP (06/18/91)

>In <31293@hydra.gatech.EDU> jt34@prism.gatech.EDU (THOMPSON,JOHN C) writes:
>>SCSI 2 supports tagged command queing which I think means that the host may
>>send multiple command requests to the same device. Do most multitasking OSs
>>allow this? Say for example in an UNIX environment that task 1 made a request
>
>I have no idea how to answer for "most" OSs.  For Unix the answer is
>a qualified "of course".  All you need is a driver that knows that
>the hardware can handle it.  The normal disk drivers (block device drivers)
>all have software queueing of requests.  The "elevator" sort is performed
>on the contents of this queue, and one entry is sent out whenever the
>controller is ready.  The driver would have to be restructured to do
>it, but it certainly can be done.  Of course, no such drivers exist in
>the PC Unix world today.

Not quite.  The SCO XENIX 2.3.4 driver and the driver I give out for
a replacement for the standard SCO driver both allow multiple threads
to run on any given target.

			Roy Neese
			Adaptec Senior SCSI Applications Engineer
			UUCP @  neese@adaptex
				uunet!cs.utexas.edu!utacfd!merch!adaptex!neese