A method of data processing, the method comprising: receiving, at a graphics processing unit "GPU", a command stream, the command stream including one or more commands to be performed by the GPU, characterized by the command stream including at least one command stream marker, the at least one command stream marker indicating a workload type of the command stream, wherein the workload type is one or more of a compute workload type or a graphics workload type; parsing, by the GPU, the at least one command stream marker from the command stream; communicating, by the GPU, the at least one command stream marker to an operation algorithm selection unit of the GPU; determining, by the operation algorithm selection unit of the GPU, an operation algorithm for preemption for the GPU based on the at least one command stream marker prior to executing the command stream; receiving, by the GPU, a preemption request; and performing, by the GPU, the operation algorithm for preemption in response to the preemption request, wherein performing the operation algorithm for preemption comprises: executing the command stream to a safe point; saving one or more results of executing the command stream to the safe point; executing another command stream related to the preemption request; and restarting the command stream at the safe point, or discarding one or more results of executing the command stream; executing another command stream related to the preemption request; and restarting the command stream at the beginning of the command stream. receiving, at a graphics processing unit "GPU", a command stream, the command stream including one or more commands to be performed by the GPU, characterized by the command stream including at least one command stream marker, the at least one command stream marker indicating a workload type of the command stream, wherein the workload type is one or more of a compute workload type or a graphics workload type; parsing, by the GPU, the at least one command stream marker from the command stream; communicating, by the GPU, the at least one command stream marker to an operation algorithm selection unit of the GPU; determining, by the operation algorithm selection unit of the GPU, an operation algorithm for preemption for the GPU based on the at least one command stream marker prior to executing the command stream; receiving, by the GPU, a preemption request; and performing, by the GPU, the operation algorithm for preemption in response to the preemption request, wherein performing the operation algorithm for preemption comprises: executing the command stream to a safe point; saving one or more results of executing the command stream to the safe point; executing another command stream related to the preemption request; and restarting the command stream at the safe point, or discarding one or more results of executing the command stream; executing another command stream related to the preemption request; and restarting the command stream at the beginning of the command stream. executing another command stream related to the preemption request; and restarting the command stream at the safe point, or discarding one or more results of executing the command stream; executing another command stream related to the preemption request; and restarting the command stream at the beginning of the command stream.