Messages in this thread | | | From | Mirian Crzig Lennox <> | Subject | Re: bottom-half functions | Date | 30 Jan 1999 08:49:28 -0500 |
| |
Ely Wilson <plexus@ionet.net> writes:
> Can someone give me a one-liner on what bottom-half functions are?
every device driver in unix (and operating systems modelled after unix, such as linux) has two parts: the part which reads and writes directly to the device, which runs in an interrupt context, and the part which manipulates the i/o buffers, which runs in a process context. the first part is called the bottom half or lower half; the second part is called the top or upper half.
the reason for this separation is that bottom half functions have to be as minimal as possible, because they run with interrupts disabled and they can't block. also, since they don't run in a process context they have no access to information about the process on whose behalf the i/o is taking place. normally, a bottom half function merely moves data between the device and an i/o buffer, and then immediately awakens anything which is blocking on the buffer. when the process which wants the buffer is scheduled in again, the top half functions actually deal with the data.
--mirian
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |