Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion What would you like to see most in minix?

View Parsed - Show only message text

Path: gmdzi!unido!mcsun!uunet!wupost!psuvax1!hsdndev!adm!lhc!mimsy!jds
From: j...@cs.umd.edu (James da Silva)
Newsgroups: comp.os.minix
Subject: Re: What would you like to see most in minix?
Summary: state-machine based device drivers
Message-ID: <38668@mimsy.umd.edu>
Date: 26 Aug 91 15:39:07 GMT
References: <1991Aug25.205708.9541@klaava.Helsinki.FI> <1991Aug25.234450.22562@nntp.hut.fi> <1991Aug26.110602.19446@klaava.Helsinki.FI>
Sender: n...@mimsy.umd.edu
Organization: University of Maryland, Department of Computer Science
Lines: 33

In article <1991Aug26.110602.19...@klaava.Helsinki.FI> torva...@klaava.Helsinki.FI (Linus Benedict Torvalds) writes:
>Unlike minix, I also happen to LIKE interrupts, so interrupts are
>handled without trying to hide the reason behind them (I especially like
>my hard-disk-driver.  Anybody else make interrupts drive a state-
>machine?).

Sure.  For one example, Alessandro Forin's Mach SCSI adapter drivers are
written this way.  A comment from his code:

/*
 * This layer works based on small simple 'scripts' that are installed
 * at the start of the command and drive the chip to completion.
 * The idea comes from the specs of the NCR 53C700 'script' processor.
 *
 * There are various reasons for this, mainly
 * - Performance: identify the common (successful) path, and follow it;
 *   at interrupt time no code is needed to find the current status
 * - Code size: it should be easy to compact common operations
 * - Adaptability: the code skeleton should adapt to different chips without
 *   terrible complications.
 * - Error handling: and it is easy to modify the actions performed
 *   by the scripts to cope with strange but well identified sequences
 *
 */

An interesting way to write a device driver.  I believe this is a very old
technique, too.

Good luck on your OS project, it sounds like a lot of fun.
Jaime
...........................................................................
: domain: j...@cs.umd.edu				     James da Silva
: path:   uunet!mimsy!jds		    Systems Design & Analysis Group

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google