Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!mcvax!philmds!nlgvax!johan
From: johan@nlgvax.UUCP (Johan Stevenson)
Newsgroups: comp.sys.atari.st
Subject: fast multi-sector floppy I/O with interrupts (question)
Message-ID: <204@nlgvax.UUCP>
Date: Tue, 14-Jul-87 16:19:20 EDT
Article-I.D.: nlgvax.204
Posted: Tue Jul 14 16:19:20 1987
Date-Received: Fri, 17-Jul-87 03:02:15 EDT
Reply-To: johan@nlgvax.UUCP (Johan Stevenson)
Distribution: world
Organization: Philips Research Geldrop
Lines: 57

Working on a floppy disk driver for the MINIX operating system for
the Atari ST I encountered a problem for which some netters may
have an answer.  The problem is the speed of multi-sector I/O.

MINIX, being a variant of UNIX, uses interrupt driven I/O.
The MINIX file system is based on 1 KB blocks. So the most frequent
floppy disk I/O requests transfer two consecutive sectors of 512 bytes.
As far as I know it is impossible to transfer two sectors with
a singe controller request and a single interrupt.
The most straightforward driver and interrupt routine I tried need
an extra floppy disk revolution between the two sector transfers.

To speed up I see the following options:

 - improve the driver, so that the interrupt caused by the first sector
   is in time to start the transfer of the second sector

 - use a non-standard floppy disk formatter that gives physically
   consecutive sectors the following relative sector numbers:
	1, 6, 2, 7, 3, 8, 4, 9, 5

 - perform the same trick as above in the driver itself

I dislike options 2 and 3. But before I continue with my trial-and-error
approach to option 1 I would like answers on the following questions:

 - is option 1 feasible, i.e. did someone succesfully implement
   fast interrupt-based multi-sector floppy I/O?

 - does someone have an example driver? (any language)

 - how many microseconds are available for the interrupt routine?

 - is a single command for several sectors really impossible?

 - what is minimally required in the interrupt routine to restart
   for the second sector?
    - test for DMA errors? read only?
    - test for controller errors?
    - check for head/cylinder change?
    - set sector register?
    - set DMA addresses?
    - clear DMA status?
    - issue controller command?

My current driver (in C) is available on request to help me resolve
this performance problem.
Thanks in advance for any clues.

				Johan W. Stevenson,
				Philips Research Laboratories,
				Project Centre Geldrop,
				Building XR, Room 15,
				Willem Alexanderlaan 7B,
				5664 AN Geldrop, The Netherlands.
				phone: +31 40 892205
				uucp: mcvax!nlgvax!johan