Mutual exclusion at the record level with priority inheritance for embedded systems using one semaphore
First Claim
Patent Images
1. A computer readable medium having stored thereon sequences of instructions which, when executed by a processor, cause said processor to perform a method, said method comprised of a plurality of a tasks that may desire to lock or unlock any of a plurality of resources, said method comprising:
- maintaining a first list, said first list listing a first group of said tasks, wherein, each task listed within said first group of tasks is waiting in a suspended state for at least one of said resources to be freed;
maintaining a second list, said second list listing a second group of said tasks, wherein, each task listed within said second group of tasks is holding at least one of said resources;
suspending a first task and expanding said first list to include said first task upon said first task desiring to lock a resource that is being held by a second task, said second task being listed on said second list, said first task having a priority, said resource having any one of a plurality of different levels;
setting a flag to a first state as a consequence of said first task said desiring to lock said resource;
comparing said priority of said first task with the priority of said second task; and
increasing the priority level of said second task to that of said first task if said second task has a lower priority than said first task.
0 Assignments
0 Petitions
Accused Products
Abstract
A method for providing mutual exclusion at a single data element level for use in embedded systems. Entries for tasks that are currently holding a resource are stored in a hold list. Entries for tasks that are not currently executing and are waiting to be freed are stored in a wait list. A single mutual exclusion semaphore flags any request to access a resource.
25 Citations
24 Claims
-
1. A computer readable medium having stored thereon sequences of instructions which, when executed by a processor, cause said processor to perform a method, said method comprised of a plurality of a tasks that may desire to lock or unlock any of a plurality of resources, said method comprising:
-
maintaining a first list, said first list listing a first group of said tasks, wherein, each task listed within said first group of tasks is waiting in a suspended state for at least one of said resources to be freed; maintaining a second list, said second list listing a second group of said tasks, wherein, each task listed within said second group of tasks is holding at least one of said resources; suspending a first task and expanding said first list to include said first task upon said first task desiring to lock a resource that is being held by a second task, said second task being listed on said second list, said first task having a priority, said resource having any one of a plurality of different levels; setting a flag to a first state as a consequence of said first task said desiring to lock said resource; comparing said priority of said first task with the priority of said second task; and increasing the priority level of said second task to that of said first task if said second task has a lower priority than said first task. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. An apparatus, comprising:
-
a processor and memory operable to execute a plurality of a tasks that may desire to lock or unlock any of a plurality of resources; said processor and memory operable to maintain; 1) a first list, said first list listing a first group of said tasks, wherein, each task listed within said first group of tasks is waiting in a suspended state for at least one of said resources to be freed; 2) a second list, said second list listing a second group of said tasks, wherein, each task listed within said second group of tasks is holding at least one of said resources; said processor and memory operable to; suspend a first task and to expand said first list to include said first task upon said first task desiring to lock a resource that is being held by a second task, said second task being listed on said second list, said first task having a priority, said resource having any one of a plurality of different levels; set a flag to a first state as a consequence of said first task said desiring to lock said resource; compare said priority of said first task with the priority of said second task; and increase the priority level of said second task to that of said first task if said second task has a lower priority than said first task. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
Specification