Patent ID: 9274826
Filing Date: 2016-03-01
CPC Classification: G06F,H04L

Claim Text:
1. A method for parallel processing implemented in a network unit, comprising: employing a first core to lock an ingress queue when the ingress queue is not locked by another core, encapsulate packets from the ingress queue into tasks for scheduling and push the tasks to one of a plurality of task queues based on one of a priority of the task, a processing flow of the task, or an order type of the task when the ingress queue is locked by the first core, and unlock the ingress queue after the pushing of the tasks; employing the first core to search a first subset of the plurality of task queues for a first unlocked task queue when the ingress queue is locked by another core, lock the first unlocked task queue and place a first task from the first unlocked task queue into an order queue when the first core finds the first unlocked task queue, and unlock the first unlocked task queue after placing the task; employing the first core to search a first remaining subset of the task queues for a second unlocked task queue when all of the first subset of the task queues are locked and the ingress queue is locked, lock the second unlocked task queue and place a second task from the second unlocked task queue into the order queue when the first core finds the second unlocked task queue, and unlock the first unlocked task queue after placing the second task, wherein the first remaining subset of the task queues comprises members of the task queues outside of the first subset of the task queues; and processing an order task that is at a head of the order queue.