Re: RFC: Resource Management

Andrew Mileski (dmtech@magi.com)
Sun, 3 Mar 1996 21:41:15 -0500 (EST)


>> 1) Should hardware resources be specified as 'from & number'
>> or as 'first & last'? (I prefer the latter).
>
>First & last are more intuitive for humans. So make the display interface
>show them.
>
>For the machine however, I think from & number has a slight advantage.
>The number of ports allocated is usually constant, e.g. each serial
>device uses 8 consecutive I/O ports ... saving two arithmetic
>operations (last = from + number - 1) in the calling code.

Doesn't matter - this number is usually calculated anyways.

>> 2) Is the order of request/release vital?
>
>Not sure about the thrust of this question. Driver writers need to
>prevent deadlock & you need to guarantee atomicity in certain places.

I was wondering if anybody else had read linux/kernel/dma.c lately.
Does it still apply?

>> 4) Is there *ANY* particular thing that would make your
>> life easier when dealing with hardware resources?
>
>Yeah :- plug'n'play :-)

I'll add that to my notes :-)

-- Andrew E. Mileski --

-------------------------------------------------------
Located in Canada's Capital: Ottawa! (EST)
mailto:dmtech@magi.com http://www.magi.com/~dmtech/