A control mechanism is established between a network processor and a tree
search coprocessor to deal with latencies in accessing the data such as
information formatted in a tree structure. A plurality of independent
instruction execution threads are queued to enable them to have rapid
access to the shared memory. If execution of a thread becomes stalled due
to a latency event, full control is granted to the next thread in the
queue. The grant of control is temporary when a short latency event
occurs or full when a long latency event occurs. Control is returned to
the original thread when a short latency event is completed. Each
execution thread utilizes an instruction prefetch buffer that collects
instructions for idle execution threads when the instruction bandwidth is
not fully utilized by an active execution thread. The thread execution
control is governed by the collective functioning of a FIFO, an arbiter
and a thread control state machine.