1. A method of scheduling packets for transmission by a network processor having a plurality of processing modules and at least one shared memory, the method comprising: generating, by the network processor, one or more tasks corresponding to each of a plurality of received packets associated with one or more data flows; receiving, by a traffic manager of the network processor, a task corresponding to a data flow, the task provided by one of the plurality of processing modules of the network processor; generating, by the traffic manager, a scheduling hierarchy comprising a tree structure of one or more scheduling levels, wherein a scheduler is a branch node and a queue is a leaf node of the scheduling hierarchy; queuing, by the traffic manager, each received task in a queue of the scheduling hierarchy associated with the received task, the queue having a corresponding parent scheduler at each of one or more next levels of the scheduling hierarchy up to a root scheduler of the scheduling hierarchy, wherein the queue and one or more corresponding parent schedulers at each level of the scheduling hierarchy form a branch of the scheduling hierarchy; selecting, by a parent scheduler, a child node to transmit a task from the traffic manager; determining, by a task read module of the traffic manager, a thread corresponding to the selected child node to read corresponding packet data from the at least one shared memory; processing, by the task read module, the thread to read the packet data corresponding to the thread from the at least one shared memory, wherein the step of processing, by the task read module, the thread to read task data corresponding to the thread from the at least one shared memory includes: determining a head pointer and task data size value corresponding to the selected task; determining, based on the head pointer and task data size value, whether the task data straddle a memory block of the at least one shared memory; if the task data does not straddle a memory block of the at least one shared memory: issuing a first read request to read task data having a size equal to the task data size value stored at the location in the at least one shared memory corresponding to the head pointer; and issuing a speculative read request to read task data associated with a subsequent task from a location of the shared memory contiguous with the data read in the first read request, whereby the speculative read request is issued with an estimated task data size value for the subsequent task, wherein the estimated task data size value is equal to N*16 B, wherein N is a configurable positive integer set by control software of the network processor; and, forming, by the traffic manager, one or more output tasks for transmission to one of the plurality of processing modules of the network processor based on the packet data corresponding to the thread.