Browse Prior Art Database

Reduction and Shaping of Context Data for Cooperative Multitasking

IP.com Disclosure Number: IPCOM000016216D
Original Publication Date: 2002-Aug-03
Included in the Prior Art Database: 2003-Jun-21
Document File: 1 page(s) / 42K

Publishing Venue

IBM

Abstract

Cooperative Multitasking requires saving and restoring of the process context when switching between tasks. This context information consists of those CPU registers that are accessed by the program afterwards. In a first proposal, the compiler can figure out which registers these are and generate code that only saves and restores the affected registers.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 57% of the total text.

Page 1 of 1

Reduction and Shaping of Context Data for Cooperative Multitasking

  Cooperative Multitasking requires saving and restoring of the process context when switching between tasks. This context information consists of those CPU registers that are accessed by the program afterwards. In a first proposal, the compiler can figure out which registers these are and generate code that only saves and restores the affected registers.

Some processors have special instructions that save multiple registers at a time. Frequently there are restrictions on the sets allowed for this instruction. In a second proposal, the code can be transformed in a way to allow the use of such an instruction. In particular, the register numbers in the code surrounding the context save/restore can be permuted such that a register set for save/restore results which complies to such a special instruction.

Cooperative multitasking means that the processor switches the context from one task to the next at locations indicated by the program. The cooperative context change includes saving the processor registers to memory and loading the appropriate values for the next process. To reduce the overhead of this operation, it is desirable to avoid handling registers that are not used by the program. Furthermore, it is desirable to modify the register set which has to be saved in a way to support specific processor features. In particular, some microprocessors provide instructions for storing and loading multipl...