Alternatively, it can be implemented using a general-purpose memory allocator, involving quite a lot of extra code and configuration options. However, this general-purpose memory allocator may be present anyway to support the application itself or some other component. The ability to create and destroy mutexes dynamically is another configuration option with no single answer that will be appropriate for all applications. An important issue for mutex locks is the handling of priority inversion, where a high priority thread is prevented from running because it needs a lock owned by a lower priority thread. If priority inversion is a theoretical possibility, then the application developer may still want to ignore it because the application has been designed in such a way that the problem cannot arise in practice.
Priority ceilings require little code but extra effort on the part of the application developer.
Priority inheritance requires more code but is automatic. Ignoring priority inversion may or may not be acceptable, depending on the application and exactly when priority inversion can occur. Some of these choices involve additional configuration options. For example, there are different ways of raising an exception, and priority inheritance may or may not be applied recursively. As a further complication, some mutexes may be hidden inside a component rather than being an explicit part of the application.