The system call int share_mem(int target_task, void *addr, int size, int perms) creates a SMO of size size words6 at offset addr of the current task address space, that can be accessed by the task7 target_task. The parameter perms indicates if access is granted for reading, writing, or both. The function returns an id number that identifies the SMO just created, or -1 in case of failure. SMOs can be destroyed using the system call int claim_mem(int smo_id) and the target task of an SMO can pass it over to another task using the system call int pass_mem(int smo_id, int target_task), which changes the target task to the supplied parameter.
The system call int read_mem(int smo_id, int off, int size, void *dest) copies the size words at offset off of the SMO identified by smo_id to the address dest. Conversely, the system call int write_mem(int smo_id, int off, int size, void *src) copies size words from address src from the current task's address space to offset off of the SMO identified by smo_id. Of course, in both cases the current task must be the target task of the SMOs, and have the right permission.