[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: off topic - Assembler using GCC



In a message dated 2/3/99 12:54:34 PM Central Standard Time,
d.wright@open.ac.uk writes:

> That's just not possible with a multi-user multi-tasking OS,
>  particularly one like unix which has to present the same abstract
>  model on completely different hardware.
>  
>  If one program "messes with" interrupts, how is any other program
>  meant to perform its function when it doesn't know what the first
>  one did?

I'm not replying to be argumentative, but I am curious about this...

I suppose there are cases where this is valid, but for my original point about
communciations - it just isn't feasible to use IRQ4 (the first comm port) by
more than one program concurrently, is it?  

In my case, I had reprogrammed IRQ4 so when a char came in from the modem, I
could stuff it to a buffer for use later on, and send data to the buffer (and
ultimately use the IRQ to send it back out again when the buffer was full)
when I had my reply ready.  I certainly wouldn't want another program taking
chars from my modem while I'm using it.

How would you accomplish the same in Linux without using interrupt routines?

>  If you screw up and crash the machine, what do you say to all the
>  other users of the machine?
>  
>  It is the job of the kernel and its drivers to be in sole control
>  of the hardware. So, it doesn't /prevent/ the use of interrupts,
>  it just reserves the right to use them for itself alone.
>  

I totally agree with that, and certainly, I'd have any bugs worked out before
I released it to other users...  :)

-Jay


Reply to: