Task Addressing

At any one time, a task can address up to eight areas of main memory in its local environment. These local memory areas are located by using the following data structures: the reinstate list, MCP environment table, user environment table, and memory area tables (MATs).

Each task has an entry in the reinstate list, a system array, where the processor and the MCP maintain information about the task.

A task can execute instructions from MCP code modules or user program code. All MCP code modules have entries in the MCP environment table. Entry 0 of the reinstate list contains a pointer to the MCP environment table. All user program code modules have entries in the user environment table related to the user task. The reinstate list entry for each user task contains a pointer to the user environment table for the task.

Each MCP or user environment table entry points to a MAT which describes the local addressing environment for that code. The first eight entries in the MAT contain the base and limit pairs for each memory area or indirect pointers to the actual base and limit pairs.

A memory area is the smallest allocatable unit of memory. It can be from 1000 to 1000000 digits in length, in 1000-digit increments. For example, a software code module that is 57244 digits in length is assigned a 58000-digit memory area. A software code module of 150 is digits assigned a 1000-digit memory area.

A memory area is located by a base and limit pair contained in a MAT entry. For references to data or code in the local addressing environment, the base relative memory addresses are added to the selected base value to determine the absolute memory location.

Memory is accessible only after the processor compares the base and limit values to the requested memory access address, and determines that the address is less than the limit value but greater than or equal to the base value. If the address is outside of the specified memory area, an address error (AEX=20-26) occurs and the instruction terminates without storing any more data into memory.

Every task has a memory area (located by user EN 0, memory area number 0) called the MCP data area, where the MCP maintains information about that task. This area also contains the reserved memory of the MCP routines for that task (see Reserved Memory Relative to the MCP Data Area). The MCP Data Area is described by the base and limit pair #0 when a task is executing MCP code.

The following instructions or procedures change the processor operating environment by resolving the first eight entries in the specified MAT and retaining the base and limit values for memory access protection.

Op Mnemonic Name
30 BCT Branch Communicate
35 VEN Virtual Enter
62 HCL Hyper Call
63 RET Return
86 ATE Alter Table Entry
93 BRV Virtual Branch Reinstate
IP Interrupt Procedure
HCP Hardware Call Procedure

The processor references these eight memory areas as the local environment (see Address Resolution). The processor can also reference non-local memory areas and provide memory access protection for such memory areas as are specified by the convert I/O, alter table entry, move string, compare string, or the hash string instructions.

procedures/task_addressing.txt · Last modified: 2011/07/23 15:39 by scott
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki