IXP2400/2800 Programming: The Complete Microengine Coding Guide

Chapter 9: Ordered Thread Execution

In Chapter 7, you learned about one model for processing packets on multiple threads and multiple microengines called unordered thread execution. This chapter describes another programming model for processing packets on multiple threads. This model is creatively called ordered thread execution. In this chapter, you will take the packet-processing sample code from Chapter 7 and modify it to use the ordered thread execution method.

Ordered thread execution has some advantages over unordered thread execution for some applications. However, for other applications, ordered thread execution is a poor choice or even completely unworkable. This chapter concludes with a discussion of when each method is most appropriate.

Simple Ordered Thread Execution

Ordered thread execution can take many forms. In this section, we ll start with a description of the simplest form. Later, you ll see more advanced forms.

For the purpose of this simple form of ordered thread execution, ordered means that certain critical drivers and microblocks run on multiple threads one at a time in thread numerical order. Is that confusing enough? It s actually not as difficult as it sounds. Figure 9.1 shows an illustration of a single packet processing microblock running in order on four threads using the simplest form of ordered thread execution.


Figure 9.1: Simple Ordered Thread Execution Example

Figure 9.1 shows four threads running code that includes an ordered packet-processing microblock. Thread 1 does not run this microblock until thread 0 has left the microblock, and so on. Thread 0 does not run this microblock until the last thread...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Thread Rolling Dies
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.