A method of operating the accelerator includes receiving a request for preemption during an execution of a first task using one or more processing elements included in the accelerator, in response to the request for preemption, moving context information of the first task stored in an internal memory of the accelerator to an external memory of the accelerator, and executing a second task associated with the request for preemption using the processing elements.