Specifications
Data Structures
1.4 Per-CPU Database (CPU)
1.4 Per-CPU Database (CPU)
A per-CPU database structure exists for each processor in a multiprocessing
environment. The per-CPU database records processor-specific information such
as the current process control block (PCB), the priority of the current process,
and the physical processor identifier. It points to the processor’s interrupt stack
and contains the list heads for the processor’s fork queues and I/O postprocessing
queue.
To ensure that the path of a processor’s activity at booting and on the interrupt
stack remains independent of the paths of other active processors in the system,
the operating system places a separate boot stack and a separate interrupt stack
(formerly pointed to by EXE$GL_INTSTK) adjacent to the area allocated for
the per-CPU database structure. The processor’s boot stack, interrupt stack,
and per-CPU database fields are virtually contiguous in system address space,
although three no-access guard pages prevent the expansion of the stacks beyond
the areas reserved for their use. Offset CPU$L_INTSTK in the per-CPU database
points to the interrupt stack.
The fields described in the per-CPU database are illustrated in Figure 1–5 and
described in Table 1–4.
Figure 1–5 Per-CPU Database (CPU)
CPU$L_CURPCB* 0
CPU$L_REALSTACK* 4
CPU$W_SIZE*CPU$B_TYPE*CPU$B_SUBTYPE* 8
CPU$B_BUSYWAITCPU$B_STATE*CPU$B_CPUMTX*CPU$B_CUR_PRI* 12
CPU$L_INTSTK* 16
CPU$L_WORK_REQ* 20
CPU$L_PERCPUVA* 24
CPU$L_SAVED_AP* 28
CPU$L_HALTPC* 32
CPU$L_HALTPSL* 36
CPU$L_SAVED_ISP* 40
CPU$L_PCBB* 44
CPU$L_SCBB* 48
CPU$L_SISR* 52
CPU$L_P0BR* 56
(continued on next page)
1–13