O'Reilly logo

HP-UX 11i Internals by Chris Moore, Chris Cooper

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Run Queues

We have used the term run queue frequently in this chapter. Let's take a moment to understand what a run queue is, where it is located, and how it is implemented.

The run queue does not exist as a single structure. It is built by linking together all runnable threads on the system to appropriate queue headers. Which queue header a runnable kthread is linked to depends on its processor affinity, its priority, kt_pri and its scheduling policy stored in kt_schedpolicy (stored in the thread's kthread structure). To enter a processor's run queue, we start with the mp_threadhd structures.

The structures are stored in a number of arrays (dependent on the number of processors and processor sets). Each of the per-processor run queues has 160 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required