A method for parallel processing implemented by a first core in a network unit, comprising: determining, whether an ingress queue is locked by another core; if the ingress queue is not locked by another core: acquiring a lock on the ingress queue, encapsulating a task and pushing the task from the ingress queue into a task queue based on at least one of a priority, a processing flow and an order type of the task, and releasing the lock on the ingress queue; if the ingress queue is locked by another core: searching for an unlocked task queue from a first subset of a plurality of task queues, wherein the first subset is different from a second subset of the plurality of task queues from which a second core begins a search for an unlocked task queue; searching a remainder of the plurality of task queues for an unlocked task queue when all of the task queues in the first subset of task queues are locked and the ingress queue is locked, acquiring a lock on a first unlocked task queue of the plurality of task queues encountered, and placing a task from said task queue of the plurality of task queues into an order queue for processing, and releasing the lock on said task queue. determining, whether an ingress queue is locked by another core; if the ingress queue is not locked by another core: acquiring a lock on the ingress queue, encapsulating a task and pushing the task from the ingress queue into a task queue based on at least one of a priority, a processing flow and an order type of the task, and releasing the lock on the ingress queue; if the ingress queue is locked by another core: searching for an unlocked task queue from a first subset of a plurality of task queues, wherein the first subset is different from a second subset of the plurality of task queues from which a second core begins a search for an unlocked task queue; searching a remainder of the plurality of task queues for an unlocked task queue when all of the task queues in the first subset of task queues are locked and the ingress queue is locked, acquiring a lock on a first unlocked task queue of the plurality of task queues encountered, and placing a task from said task queue of the plurality of task queues into an order queue for processing, and releasing the lock on said task queue. acquiring a lock on the ingress queue, encapsulating a task and pushing the task from the ingress queue into a task queue based on at least one of a priority, a processing flow and an order type of the task, and releasing the lock on the ingress queue; if the ingress queue is locked by another core: searching for an unlocked task queue from a first subset of a plurality of task queues, wherein the first subset is different from a second subset of the plurality of task queues from which a second core begins a search for an unlocked task queue; searching a remainder of the plurality of task queues for an unlocked task queue when all of the task queues in the first subset of task queues are locked and the ingress queue is locked, acquiring a lock on a first unlocked task queue of the plurality of task queues encountered, and placing a task from said task queue of the plurality of task queues into an order queue for processing, and releasing the lock on said task queue. searching for an unlocked task queue from a first subset of a plurality of task queues, wherein the first subset is different from a second subset of the plurality of task queues from which a second core begins a search for an unlocked task queue; searching a remainder of the plurality of task queues for an unlocked task queue when all of the task queues in the first subset of task queues are locked and the ingress queue is locked, acquiring a lock on a first unlocked task queue of the plurality of task queues encountered, and placing a task from said task queue of the plurality of task queues into an order queue for processing, and releasing the lock on said task queue.