[ECOS] How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s...

Bart Veer bartv@ecoscentric.com
Tue Feb 21 20:35:00 GMT 2006


>>>>> "Rob" == Robert Bryce <rob@mobilia-os.com> writes:

    >> If I had my way, mutexes and condition variables would be the only
    >> synchronization primitives available in the OS.

    Rob> Hm. I will agree that one set of primitives is all that an OS
    Rob> needs to provide. Keeps the model simpler. I'm really
    Rob> indifferent on which set, though I do prefer semaphores. In
    Rob> the end, it's just not a big deal.

I would disagree. From a theoretical perspective it is true that
everything can be done with just mutexes and condition variables. That
is a general-purpose combination. Also it is true that having too many
primitives causes confusion and makes maintenance more difficult.
However other primitives, especially semaphores, allow certain common
operations to be performed using less code, less data, fewer cpu
cycles, and less impact on real-time responsiveness. I would not want
semaphores as my only primitive, but I also do not want
mutexes/condition variables as the only one.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list