1. A method for executing a sequence of instructions in a device comprising a computer, the method comprising: associating a first processor context with the sequence of instructions; determining that scheduling the sequence of instructions requires a switch from a second processor context to the first processor context; performing a context switch action to switch from the second processor context to the first processor context; and entering the sequence of instructions.