Uniprocessor operating system design facilitating fast context switching
Abstract
A task stack and a context pointer in a task control block (TCB) are implemented to provide more efficient context switching. Additionally, multiple routines each of which saves or restores a certain combination of volatile registers is implemented. A task can store in its task control block a routine identifier to select from the multiple routines a set of routines for saving and restoring volatile registers during context switching. On the occurrence of an event that may lead to a context switch a scheduler selects based on the routine identifier a routine that only saves registers used by the task, thereby, reducing execution overhead. The registers are saved on the task stack and a context pointer to the registers is saved in the TCB. In the event a context switch is necessary, it is not necessary to copy the registers to the TCB because the context pointer is in the TCB. A non-volatile register indicator that indicates whether non-volatile registers are used is stored in the task control block. The non-volatile registers are only saved if used, also reducing execution overhead. Furthermore, a storage area is implemented for saving task context for the task when it is interrupt
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 19 · Forward citations: 20.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method being stored as a set of instructions on a computer-readable medium, the set of instructions being executable by a processor to perform the method, the method comprising: receiving an event leading to a context switch; determining whether a user task uses first task context information by examining a first task context information indicator in a task data structure associated with the user task; storing the first task context information in a temporary memory for use following the context switch only if the user task uses the first tank context information; setting a context pointer s
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 20 total)
References Cited — Backward Prior Art (19)
Non-Patent Literature (5)
- Ball, Tony. "Real Time Operating System Performance Issues and Techniques with RISC." IEEE. Nov. 1991.
- Davidson, Jack W. et al. "Methods for Saving and Restoring Register Values across Function Calls." Feb. 1991.
- Hsiao, Shawn et al. "Context Switching and Scheduling in C-" May 11, 2000.□□.
- IBM Technical Disclosure Bulletin. "Deterministic Context Switching of Registers." Nov. 1, 1989.
- Snyder, Jeffrey S. et al. "Fast Context Switches: Compiler and Architectural Support for Preemptive Scheduling." 1995.