In a MAS OS, the RID bits act as an address space identifier or tag. For each
process-private region, a unique RID is assigned to that process by the OS. If a process
needs multiple process-private regions (e.g. the process requires a private 64-bit
address space), the OS assigns multiple unique RIDs for each such region. Because
each translation in the processor's TLBs is tagged with its RID, the TLBs may contain
translations from many different address spaces (RIDs) concurrently. This obviates the
need for the OS to purge the processor's TLBs upon an address space switch. When the
OS performs a context switch from process A to process B, the OS need only remove
process A's private RIDs from the CPU's region registers and replace them with process
B's private RIDs.
5.1.1.3
Cross-address Space Copies in a MAS OS
The use of regions, region registers, and RIDs provides a mechanism for efficient
address space-to-address space copies. Because translations are tied to RIDs and not
to a particular static region, a MAS OS can easily copy a memory range from one
address space to another by temporarily remapping the target memory location to
another region. This remapping is accomplished simply by placing the RID to which the
target location belongs into a different region register and then performing the copy
from source to target directly.
For example, assume a MAS OS wishes to copy and 8-byte buffer from virtual address
0x0000000000A00000 of the currently executing process (process A) to virtual address
0x0000000000A00000 of another process (process B):
copyloop:
space
(p4)br copyloop
When the OS switches to process B and places process B's RID into RR[0] and resumes
execution of process B, the process can reference the message via virtual address
0x0000000000A00000. Note that no new translations need to be created to make the
sequence shown above work; because translations are tagged by RID and not by
region, all existing translations for process B's address space are visible regardless of
which region the reference is made to, as long as the region register for that region
contains the correct process B RID. Note that the sequence shown above is intended for
illustrative purposes only; the OS may need to perform other steps as well to perform a
cross-address space copy.
Volume 2, Part 2: Memory Management
movl r2 = (2 << 61)
mov r3 = process_b_rid
movl r4 = 0x0000000000A00000
movl r5 = 0x4000000000A00000;;;
mov rr[r2] = r3 ;;
srlz.d
ld8 r6 = [r4] ;;
st8 [r5] = r6
mov r3 = original_rr2_rid ;;
mov rr[r2] = r3 ;;
srlz.d
// reference process B through RR[2]
// put process B RID into RR[2]
// serialize RR write
// read buffer from process A addr space
// store buffer into process B addr
// loop until done
// restore RR[2] RID
// serialize RR write
2:563
Need help?
Do you have a question about the ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 and is the answer not in the manual?
Questions and answers