Common scheduling and synchronization primitives
First Claim
1. A method of executing code, the method comprising:
- performing, by said code during execution of said code, a call using an application programming interface requesting a first of a plurality of operations, said plurality of operations corresponding to scheduling and synchronization primitives which are operations performed on different scheduling objects;
determining, during runtime in response to said call, whether to perform said first operation, said determining using a set of one or more criteria indicating conditions as to when said scheduling and synchronization primitives are allowed to be performed, said one or more criteria being determined in accordance with a plurality of different platforms, wherein said plurality of operations are performed in accordance with a set of semantics specified using the set of one or more criteria whereby each of said plurality of operations, when executed in accordance with said set of one or more criteria, exhibits a same runtime behavior when executed in a privileged execution mode and a non-privileged execution mode on each of said different platforms; and
invoking code of the application programming interface to register a device driver executing in the non-privileged execution mode and including an interrupt service routine that services interrupts for a device and executes in the non-privileged execution mode, wherein a reader-writer lock is used by code that executes in the non-privileged execution mode to implement disabling and enabling interrupts in accordance with semantics of the privileged execution mode, wherein one or more readers are allowed read access to the read-write lock when not already accessed for writing and wherein a writer with write access to the read-write lock has exclusive access to the read-write lock.
9 Assignments
0 Petitions
Accused Products
Abstract
Described are techniques for executing code performing one or more operations corresponding to scheduling and synchronization primitives. During execution of the code, a call is performed using an application programming interface requesting a first of the operations corresponding to one of said scheduling and synchronization primitives. During runtime in response to said call, it is determined whether to perform the first operation. The determining step uses a set of one or more criteria indicating conditions as to when the scheduling and synchronization primitives are allowed to be performed. The one or more criteria are determined in accordance with a plurality of different platforms. If it is determined that the first operation is allowable and the first operation is to be performed, then the code can be executed on each of the different platforms in a privileged execution mode and a non-privileged execution mode.
-
Citations
21 Claims
-
1. A method of executing code, the method comprising:
-
performing, by said code during execution of said code, a call using an application programming interface requesting a first of a plurality of operations, said plurality of operations corresponding to scheduling and synchronization primitives which are operations performed on different scheduling objects; determining, during runtime in response to said call, whether to perform said first operation, said determining using a set of one or more criteria indicating conditions as to when said scheduling and synchronization primitives are allowed to be performed, said one or more criteria being determined in accordance with a plurality of different platforms, wherein said plurality of operations are performed in accordance with a set of semantics specified using the set of one or more criteria whereby each of said plurality of operations, when executed in accordance with said set of one or more criteria, exhibits a same runtime behavior when executed in a privileged execution mode and a non-privileged execution mode on each of said different platforms; and invoking code of the application programming interface to register a device driver executing in the non-privileged execution mode and including an interrupt service routine that services interrupts for a device and executes in the non-privileged execution mode, wherein a reader-writer lock is used by code that executes in the non-privileged execution mode to implement disabling and enabling interrupts in accordance with semantics of the privileged execution mode, wherein one or more readers are allowed read access to the read-write lock when not already accessed for writing and wherein a writer with write access to the read-write lock has exclusive access to the read-write lock. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. A non-transitory computer readable medium comprising code stored thereon, wherein the code, when executed, performs a method comprising:
-
providing an application programming interface for performing a plurality of operations, said plurality of operations corresponding to scheduling and synchronization primitives which are operations performed on different scheduling objects; providing a set of one or more criteria indicating conditions as to when said scheduling and synchronization primitives are allowed to be performed, said one or more criteria being determined in accordance with a plurality of different platforms; performing, by other code during execution of other code, a call using said application programming interface to perform a first one of the plurality of operations; determining, during runtime in response to said call and using said set of one or more criteria, whether to perform said first operation, wherein said plurality of operations are performed in accordance with a set of semantics specified using the set of one or more criteria whereby each of said plurality of operations, when executed in accordance with said set of one or more criteria, exhibits a same runtime behavior when executed in a privileged execution mode and a non-privileged execution mode on each of said different platforms; and invoking code of the application programming interface to register a device driver executing in the non-privileged execution mode and including an interrupt service routine that services interrupts for a device and executes in the non-privileged execution mode, wherein a reader-writer lock is used by code that executes in the non-privileged execution mode to implement disabling and enabling interrupts in accordance with semantics of the privileged execution mode, wherein one or more readers are allowed read access to the read-write lock when not already accessed for writing and wherein a writer with write access to the read-write lock has exclusive access to the read-write lock. - View Dependent Claims (17, 18, 19, 20, 21)
-
Specification