This section describes the LSE/OS C library:

Thread Creation
thread_create() is a convenience routine for creating runnable threads. See Coresrv for task creation sequence diagram.

Loading of an exec
load_exec() is a convenience routine for loading binary (ELF) files into memory. threads. It requires to have an address space id. Several options are available for this function. Altough files are loaded through usual open(), read() and write() routines, it is possible to load files directly from the (in memory) bootfs. Here the (simplified) sequence diagram of the routine:

Loading an executable from bootfs (Step 1)

The next sequence diagram illustrates what happen when a file is loaded from a filesystem:

Loading an executable from filesystem (Step 1)

Things are more complex from here, since an ELF file is divided into sections that have to be remapped at some specific places, that have to be shared or not, etc (see ELF file format):

Loading exec (Step 2)