All MI instructions supported by MI Portal are listed by categories as the following.
Supported MI Instructions Sorted by Category
Pointer-based mutexes is a lightweight synchronization mechanism available at the MI level. We will refer to pointer-based mutexes simply as mutexes in the following portion of this Web page. Some important features of pointer-based mutexes are the following:
- Mutexes are implemented via synchronization pointers (one type of MI pointers in IBM i)
- Mutexes aren NOT MI objects. They cannot survive accross IPLs or vary off/vary on cycle of an independent ASP
- Mutexes occupy system resources until they're destroyed. So it's reasonable to destroy unused mutexes.
- The lifecycle of a mutex can be independent of its owning thread. This is a remarkable advantage of mutexes over POSIX process/thread synchronization primitives.
- Mutexes can be created upon the storage of a persistant MI object. A persistent MI object is available to all MI processes/threads in the system.
Mutex management MI instructions supported by MI Portal are the following:
MI Instruction | Instruction Index | Operands | Usage Examples
|
CRTMTX | 42 (hex 002A) |
- [in] Pointer ID of an existing space pointer. The created mutex (a synchronization pointer) will be put into storage addressed by this space pointer.
- [in] 32-byte mutex creation template
- [out] Bin(4) result code
|
|
DESMTX | 43 (hex 002B) |
- [in] Pointer ID of an space pointer addressing the control area (a synchronization pointer) of a pointer-based mutex
- [in] Bin(4) mutex destroy template, must be zero
- [out] Bin(4) result code
| -
|
LOCKMTX | 44 (hex 002C) |
- [in] Pointer ID of an space pointer addressing the control area (a synchronization pointer) of a pointer-based mutex
- [in] 16-byte lock request template
- [out] Bin(4) result code
| -
|
UNLKMTX | 45 (hex 002D). |
- [in] Pointer ID of an space pointer addressing the control area (a synchronization pointer) of a pointer-based mutex
- [out] Bin(4) result code
| -
|
The term
heap we used here refers to Single Level Store (SLS) heap storage spaces. IBM i SLS heaps has some distinguish features in comparison with their counterparts in common-platform:
- As one form of SLS storage, it has the 16M - 1 Page size limit of a maximum single allocation
- The amount of heap space storage that can be allocated for a single heap space is 4G-512K bytes. (Due to fragmentation a heap space may grow to 4GB-512KB without having 4GB-512KB of outstanding heap space storage allocations.)
- SLS heaps are activation group-based. As resource management constructs, there can by many activation groups (AGPs) within a single job. A single activation group can have many SLS heaps, either in system doamin or in user doamin.
- A SLS heap can be created as allowing heap space mark. Marking a heap space allows a subsequent Free Activation Group-Based Heap Space Storage from Mark (FREHSSMK) instruction, using the mark identifier returned by the Set Activation Group-Based Heap Space Storage Mark (SETHSSMK) instruction, to free all outstanding allocations that were performed against the heap space since the heap space was marked with that mark identifier. This relieves the user of performing a Free Activation Group-Based Heap Space Storage (FREHSS) for every individual heap space allocation.
MI Instruction | Instruction Index | Operands | Usage Examples
|
ALCHSS | 31 (hex 001F) |
- [in/out] Pointer ID to a space pointer addressing the newly allocated heap storage.
- [in] Bin(4). Heap ID. A value of zero represent the default heap space of an AGP.
- [in] Bin(4). Number of bytes to allocate. The possible maximum single allocation size for a Single Level Store (SLS) heap is 16M - 1 Page.
|
|
CRTHS | 32 (hex 0020) |
- [out] Bin(4). Heap ID of the created heap space
- [in] 96-byte heap creation template
| -
|
DESHS | 33 (hex 0021) |
- [in] Bin(4). Heap ID of the created heap space
| -
|
FREHSS | 34 (hex 0022) |
- [in] Pointer ID to the space pointer addressing the beginning of allocated heap storage
| -
|
REALCHSS | 35 (hex 0023) |
- [in] Pointer ID to a space pointer addressing the reallocated heap storage
- [in] Bin(4). Number of bytes to reallocate. The possible maximum single allocation size for a Single Level Store (SLS) heap is 16M - 1 Page
| -
|
SETHSSMK | 36 (hex 0024) |
- [in/out] Pointer ID to a space pointer serving as a mark ID
- [in] Bin(4). Heap ID
| -
|
FREHSSMK | 37 (hex 0025) |
- [in/out] Pointer ID to a space pointer serving as a mark ID
| -
|
MATHSAT_H | 39 (hex 0027) |
- [in] Pointer ID of the space pointer addressing the materialization template
- [in] Heap ID template
- [in] Char(1). Attribute selection
| -
|
MI Instruction | Instruction Index | Operands | Usage Examples
|
CRTS | 22 (hex 0016) |
- [out] Pointere ID of the system pointer to the created space object
- [in] Creation template
| -
|
CRTS_H | 23 (hex 0017) |
- [out] Pointere ID of the system pointer to the created space object
- [in] Pointer ID of the space pointer addressing the creationg template (allocated at server side)
| -
|
DESS | 24 (hex 0018) |
- [in] Pointer ID of the SYP to the space object to destroy
| -
|
MATS | 25 (hex 0019) |
- [inout] 116-byte materialization template
- [in] Pointer ID of the SYP to the space object
| -
|
MATS_H | 26 (hex 001A) |
- [in] Pointer ID of the SPP to the materialization template (allocated at server side)
- [in] Pointer ID of the SYP to the space object
| -
|
MODS1 | 27 (hex 001B) |
- [in] Pointer ID of the SYP to target space object
- [in] Bin(4) space size
| -
|
MODS2 | 28 (hex 001C) |
- [in] Pointer ID of the SYP to target space object
- [in] 28-byte modification template
| -
|
MI Instruction | Instruction Index | Operands | Usage Examples
|
SETSPPFP | 7 |
- Operand 1. Receiver space pointer
- Operand 2. Source pointer
| wrtusrspc.clp. Writing a User Space (USRSPC) object
|
ADDSPP | 10 |
- Operand 1. Receiver space pointer
- Operand 2. Source space pointer
- Operand 3. Increment
| wrtusrspc.clp. Writing a User Space (USRSPC) object
|
SUBSPP | 11 |
- Operand 1. Receiver space pointer
- Operand 2. Source space pointer
- Operand 3. Decrement
| -
|
SUBSPPFO | 12 |
- Operand 1. Offset difference
- Operand 2. Minuend space pointer
- Operand 3. Subtrahend space pointer
| -
|
STSPPO | 13 |
- Operand 1. Bin(4) receiver
- Operand 2. Space pointer
| -
|
SETSPPO | 14 |
- Operand 1. Space pointer
- Operand 2. Bin(4) offset
| -
|
MI Instruction | Instruction Index | Operands | Usage Examples
|
MATCTX1_H | 39 (hex 0027) |
- [in] Pointer ID of the SPP adddressing the materialization template
- [in] Materialization options
|
|
MATCTX2_H | 40 (hex 0028) |
- [in] Pointer ID of the SPP adddressing the materialization template
- [in] Pointer ID of SYP to target context object
- [in] Materialization options
| -
|
MI Instruction | Instruction Index | Operands | Usage Examples
|
GENUUID | 2 | Operand 1. UUID return template | uuid.java
|
MATMATR | 1 |
- Operand 1. Materialization template
- Operand 2. Machine attributes
|
- hmc.java. Retrieving HMC information of an IBM i server
- vrm.java. Materializing the LIC VRM (Version Release Modfication) code of an IBM i server
- prcnum.rpgle. Retrieving the number of installed processors
|