{section: Standard Universe} Notes from Peter Keller's 2011-11-30 brain-dump. {subsection: libsyscall} The standard universe requires 'condorized' binaries, which are "statically-linked" binaries (see below for the standard universe definition thereof) created by _condor_compile_, which, despite the name, is a linker, rather than a compiler. It creates binaries with the API stack on the right.
normal condorized --------------- ------------------ | application | | application | | | | |------------| | | | | libsyscall | --------------- |------------| | | libc | | libc | | --------------- ------------------ | kernel | | kernel | --------------- ------------------The interposition layer, _libsyscall_, comes before libc on the link line; the application thus calls its functions in preference to libc's. (Note that libsyscall does not override every libc function; only those necessary for checkpointing and/or remote I/O.) When starting a standard universe job, the standard universe -specific shadow establishes a connection with the startd. This connection is inherited by the standard universe -specific starter, which in turn bequeaths it to the application (specifically, libsyscall). The starter's connection is used for startup, shutdown, and suspend/resume. All other communication to the shadow comes from libsyscall. There may be machinery in libsyscall to make it signal-atomic. {subsection: "Statically-Linked"} Because the OS-provided information on (in-memory) segment boundaries is frequently (but inconsistently) wrong, the checkpointer must guess them. Because it runs in the signal handler, it is impossibly tricky to handle segfaults; therefore, it must guess them correctly. To make this possible, a standard universe application must keep all its voilatile data on the stack or in the .data segment, and it must be laid out in memory as follows.
--------------- | environment | |-------------| <- guessed; may be an unmapped page here | the stack | | | |--\/\/\/\/\/-| <- guessed | | |-/\/\/\/\/\--| <- sbrk | .data | |-------------| | .bss&.bzero | |-------------| <- _data_start (linker symbol) | .text | ---------------This layout is known to Linux as the "vm compat" personality. To force an application to run this way, you can use the _setarch_ program. (To run a standard universe program in stand-alone mode, _setarch