1. A computer system for executing a task, the computer system comprising: a main processor, a processing element and memory, the computer system configured to perform a method comprising: receiving, at the processing element, the task from the main processor; performing, by the processing element, an instruction specified by the task; determining, by the processing element, that a function is to be executed on the main processor, the function being part of the task; sending, by the processing element, a request to the main processor for execution, the request comprising execution of the function; and receiving, at the processing element, an indication that the main processor has completed execution of the function specified by the request.