MUTEX

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pepito

MUTEX

Post by pepito »

Hello:

About the 'device manager' or 'i/o system', some devices need to be acceced one by one, but:

The mutual exclusion (MUTEX) is usually implemented at kernel level? Or at 'device driver' level?

Thank you very much!

pepito
EyeScream

RE:MUTEX

Post by EyeScream »

A mutex is a shared memory object, and its use might (and probably will) go beyond just driver manager. So, there's sense in implementing it at the kernel level, with all necessary optimizations (i.e. you might use a separate memory space -- a non-swapped one -- for such objects, which would allow faster work).
pepito

RE:MUTEX (again)

Post by pepito »

Sorry, my eanglish is very bad.

I understand that MUTEX is abbreviation of 'mutual exclusion', a technique used to guarantee that never two process access to a 'shared object' at the same time.

Let me try to make my question again:

Some devices are used concurrently (by many process at the same time) and then a 'semaphore' object is needed to control the access to those devices.

My quiestion is:

This 'semaphore' must be placed into the 'device driver', or at kernel level?

I know it could be as I want, but where it is normally placed?

Again, sorry my poor english...

Thank you very much!

pepito
Post Reply