Answer to: What is a kernel?

Wm del Solar solar at george4.bear.com
Thu Oct 27 15:38:02 GMT 1994


> Jonathan R. Lusky (lusky at knuth.mtsu.edu) wrote:

> ....  We were "told" that semaphore operations (P & V) are pretty
> expensive respect to cpu cycles.

Semaphores are not expensive when a "test and set" instruction is part
of the target's instruction set.  With a test and set instruction, it
is easy to protect the semaphore counter, and the rest of the
semaphore's implementation is easy.  Without test and set, it is not
impossible to implement a semaphore, but it will be more difficult and
probably slower than a test and set implementation.

> Is that a problem in the real world,

No.

> or is it insiginificant compred to the number of spare CPU cycles
> we've got nowadays (with respect to EFI controllers :)?

It is insignificant.  You will wait for tens of microseconds on a
semaphore operation, and you will wait for tens or hundreds of
milliseconds for various engine related events to occur.

Bill del Solar (solar at bear.com)
-- My opinions are mine only.



More information about the Diy_efi mailing list