Reusable, operating system aware hardware mutex
First Claim
1. A system comprising:
- a mutexes controller comprising a locked mutex cache to store a list of records each including a mutex ID tag and a waiter flag;
a lock register and an unlock register that are each readable by said mutexes controller and loadable by software tasks with a mutex ID specifying, one of a plurality of hardware resources in a computer system, said computer system comprises an operating system; and
said mutexes controller operable to;
monitor whether said lock register has been loaded with a mutex ID and then;
determine whether said mutex ID corresponds with a mutex ID tag of a record in said locked mutex cache; and
if so, to set said waiter flag of said record;
orif not, to add a record to said locked mutex cache having said mutex ID tag that corresponds with said mutex ID; and
monitor whether said unlock register has been loaded with a mutex ID and then;
determine whether said mutex ID corresponds with a mutex ID tag of a record in said locked mutex cache; and
if so, determine whether said waiter flag of said record is not set and, if so, to clear said record from said locked mutex cache;
wherein an operating system scheduler is operable to locate highest priority software task in a runnable state after said add;
said computer system operable to then execute the highest priority software task; and
said system is operable to handle nested mutexes with hardware performing un-nested operations and said operating system performing nested operations.
2 Assignments
0 Petitions
Accused Products
Abstract
Hardware resources sharing for a computer system running software tasks. A controller stores records including a mutex ID tag and a waiter flag in a cache. Lock and unlock registers are readable by the controller and loadable by the tasks with a mutex ID specifying a hardware resource. The controller monitors whether the lock register for loading with a mutex ID, and then determines whether it corresponds with the tag of a record in the cache. If so, it sets the record'"'"'s waiter flag. If not, it adds a record having a tag corresponding with the mutex ID. The controller also monitors whether the unlock register for loading with a mutex ID, and then determines whether it corresponds with the tag of a record in the cache. If so, it determines whether that record'"'"'s waiter flag is set and, if so, it clears that record from the cache.
-
Citations
20 Claims
-
1. A system comprising:
-
a mutexes controller comprising a locked mutex cache to store a list of records each including a mutex ID tag and a waiter flag; a lock register and an unlock register that are each readable by said mutexes controller and loadable by software tasks with a mutex ID specifying, one of a plurality of hardware resources in a computer system, said computer system comprises an operating system; and said mutexes controller operable to; monitor whether said lock register has been loaded with a mutex ID and then; determine whether said mutex ID corresponds with a mutex ID tag of a record in said locked mutex cache; and if so, to set said waiter flag of said record;
orif not, to add a record to said locked mutex cache having said mutex ID tag that corresponds with said mutex ID; and monitor whether said unlock register has been loaded with a mutex ID and then; determine whether said mutex ID corresponds with a mutex ID tag of a record in said locked mutex cache; and if so, determine whether said waiter flag of said record is not set and, if so, to clear said record from said locked mutex cache; wherein an operating system scheduler is operable to locate highest priority software task in a runnable state after said add; said computer system operable to then execute the highest priority software task; and said system is operable to handle nested mutexes with hardware performing un-nested operations and said operating system performing nested operations. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A process for locking a mutex that controls access to a shared resource by software tasks running under an operating system, the process comprising:
-
monitoring a lock register for a mutex ID having been loaded therein by one of the software tasks; determining whether said mutex ID corresponds with a mutex ID tag of a record in a locked mutex cache; if so; setting a waiter flag of said record; and communicating to said operating system a request for conventional handling of the shared resource; if not, adding a new record to said locked mutex cache with a mutex ID tag corresponding with said mutex ID, without interrupting the software tasks or the operating system; after said communicating, an operating system scheduler locating highest priority software task in a runnable state; executing said highest priority software task; and handling nested mutexes with hardware performing un-nested operations and said operating system performing nested operations. - View Dependent Claims (8, 9, 10, 11, 12, 13)
-
-
14. A process for unlocking a mutex that controls access to a shared resource by software tasks running under an operating system, the process comprising:
-
monitoring an unlock register for a mutex ID having been loaded therein by one of the software tasks; determining whether said mutex ID corresponds with a mutex ID tag of a record in a locked mutex cache; if said mutex ID corresponds with a record; determining whether a waiter flag of said record is set; if said waiter flag is set, asserting an interrupt; if said waiter flag is not set, clearing said record from said locked mutex cache; if said mutex ID does not correspond with a record, asserting an interrupt; after an occurrence of either of said asserting said interrupt, an operating system scheduler locating highest priority software task in a runnable state; executing said highest priority software task; and handling nested mutexes with hardware performing un-nested operations and said operating system performing nested operations. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification