Re: Kernel device driver programming

From: Arthur Corliss <acorliss@nevaeh-linux.org>
Date: Sat Feb 19 2005 - 11:28:54 AKST

On Fri, 18 Feb 2005, Grant Stockly wrote:

> Are block or character devices faster? I'm finding more tutorials on
> character devices. I need to get 7.7MB/s interrupt driven data stream into
> userspace. :)

Character devices are typically used for unbuffered non-random access. Block
devices are mandatory random-access, and are a bit more complicated to
initialise (requiring a strategy routine, etc.). The reason why you see so
many tutorials on character devices is because they're much simpler to deal
with in general.

Do you need to stream data to a device, or are you just trying to guarantee
data capture rates? I'm no expert on these kind of I/O applications but
solutions to problems like that can be found in the XFS filesystem which has a
realtime subvolume feature (though I'm not sure how fully supported it is
under Linux). They designed it specifically to provide near raw I/O data
rates for streaming media applications. It's as close as a deterministic data
rate as you can get on a non-realtime OS.

        --Arthur Corliss
          Bolverk's Lair -- http://arthur.corlissfamily.org/
          Digital Mages -- http://www.digitalmages.com/
          "Live Free or Die, the Only Way to Live" -- NH State Motto
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Feb 19 11:28:58 2005

This archive was generated by hypermail 2.1.8 : Sat Feb 19 2005 - 11:28:59 AKST