A system and method for multi-level context switching in an electronic network comprises a control state machine configured to implement a data priority scheme, a return address generator configured to hold and release return addresses for interrupted instruction modules in accordance with the data priority scheme and context information from the electronic network, and a processor configured to process data from the electronic network in accordance with the data priority scheme and the context information. Receive registers stores data received from the electronic network. The control state machine includes a switch address generator and a program counter select. The switch address generator outputs a switch address, which is an address for a first instruction for a selected-context instruction module. The return address generator holds and releases the return addresses, which are addresses of next consecutive instructions, when an instruction module is interrupted for a context switch. The program counter select outputs a switch address, a return address, or a next consecutive address to select the appropriate instruction in the memory for execution by the processor.
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a continuation of co-pending U.S. application Ser. No. 09/336,064, entitled "System And Method For Multi-Level Context Switching In An Electronic Network," filed on Jun. 18, 1999. This application is also related to co-pending U.S. application Ser. No. 09/322,632, entitled "System And Method For Context Switching In An Electronic Network," filed on May 28, 1999, and to co-pending U.S. application Ser. No. 09/363,086, entitled "System And Method For Fast Data Transfers In An Electronic Network," filed on Jul. 28, 1999. The related applications are commonly assigned, and are hereby incorporated by reference.
A method, apparatus and computer instructions for storing data relating to the switch in a context switch history containing a number of prior context switches occurring prior to a current context. The storing of data occurs in response to a change in context for a direct memory access resource. Portions of the direct memory access chain of requests are freed using the context switch history to form freed portions, wherein the freed portions are reused for requests.
A method, apparatus, and computer instructions for managing direct memory access transfers. Monitoring is performed for an event to pass ownership of a direct memory access resource to a new thread. A buffer of the new thread is added by an operating system component to the end of a direct memory access chain of requests from the current thread. The addition of this buffer to the end of a direct memory access chain provides an anchor point for the new thread to add additional requests for the direct memory access resource.
A resource scheduler is provided for allocating a computer system resource to database management system (DBMS) processes. The resource scheduler operates according to resource plans and resource allocation methods. Each plan allocates the resource according to a resource allocation method. During operation of the DBMS, any of the active plans and resource allocation method may be exchanged for alternate plans or resource allocation methods. The resource scheduler enforces an emphasis resource allocation method in which processor time is allocated in percentages to groups of database processes groupified according to common execution requirements. A selected plan includes multiple process groups and/or sub-plans. The resource scheduler allocates processor time in multiple levels among the sub-plans and groups of database processes. Database processes are automatically switched between the groups of a plan according to switch criteria.
A computer system is selectively quiesced by preventing selected resource consumers from starting new activity on a computer system, while allowing already-running activity to continue. Resource consumers are divided into resource consumer groups, and some groups are prevented from starting new activity while other groups are allowed to start new activity. A scheduler is used to alternate between resource plans, including a quiescence plan and an operations plan.
One embodiment of the present invention provides a resource scheduler for allocating a computer system resource, such as memory or mass storage, within a processor, to database management system (DBMS) processes. The resource scheduler operates according to resource plans and resource allocation methods. One or more plans may be configured and loaded with the DBMS. Each plan allocates the resource according to an associated resource allocation method. During operation of the DBMS, any or all of the active plans and resource allocation methods may be exchanged for alternate plans or resource allocation methods. In one embodiment of the invention the resource scheduler enforces a maximum active sessions resource allocation method in which system resources are allocated by limiting the number of active sessions allowed in groups of database processes grouped according to common execution requirements. A selected plan includes multiple process groups and/or sub-plans. The resource scheduler allocates system resources among the sub-plans and groups of database processes according to their associated limits on active session numbers, with sub-plans and groups having higher active session limits getting access to more system resources than sub-plans and groups having lower active session limits.