Revision history   OpenPOWER Library

 4.4. Process Management

 In the shared programming model, the PSL switches between the processes scheduled to use the AFUs by system software. This section describes the procedures for both system software and the PSLs for scheduling, descheduling, and terminating processes.

 The CAIA allows for multiple PSLs or multiple "Virtual" PSLs to be assigned to a single Scheduled Processes Area containing a linked list of processes. When multiple PSLs are assigned to a linked list of processes, each PSL is given a unique ID as well as the ID of the next PSL, creating a chain of PSLs. When system software issues a process management command such as add_element, the PSL_ID field in the software command/status location is set to the ID of the first PSL in the chain and then issues an MMIO to th PSL_LLCMD_An Register to initiate the operation. If required, the PSL then sets the PSL_ID field in the the software command/status location to the ID of the next PSL in the chain, causing the next PSL to also perform the operation. In the following sections, the term first_psl_id refers to the ID of the first PSL in the chain and the term next_psl_id refers to the ID of the next PSL in the chain.

 To schedule a process for an AFU, system software adds a process element entry to the linked list in system memory. Once added, the PSL starts the new process at the next available context interval for a time-sliced programming model or at an implementation-dependent point in time for an AFU-directed programming model.

 For the time-sliced programming models, any newly added processes are placed into a circular queue maintained by the PSL, referred to as the psl_queue. Process elements are pulled from the psl_queue in a round-robin order by one or more CAIA-compliant devices to be run.

 When a process element completes, system software is responsible for removing the process element and updating the link list before allocating the process element to another process.

 To terminate a process element, system software first sets the system software state field in the process element to indicate that the process element is being terminated. Next, system software issues a termination command to the first PSL, which initiates a sequence of operations to remove the process element from the PSL queue. The termination pending status is needed to prevent a PSL from starting or resuming the process while the corresponding process entry is being removed from the PSL queue.

 The following sections define the system software and PSL procedures for various process elements and linked list management. In the following sections, the terms starting with "link_of_element_to" refer to the process element link for which the command is to be performed. The process element link is the offset from the SPA_Base shifted right by seven bits.

loading table of contents...