Modify the global process state

To be VP safe, a well-behaved C UDR must avoid modification of the global process state.

All virtual processors that belong to the same VP class share access to both data and processing queues in memory. However, the global process state is not shared. The database server assumes that the global process state of each VP is the same. This consistency ensures that VPs can exchange work on threads.

For a C UDR to be well-behaved, it must avoid any programming tasks that modify the global process state of the virtual processor. Update of global and static data (Avoid modification of global and static variables) involves modification of the global process. A well-behaved UDR must not use operating-system calls that can alter the process state, such as chdir(), fork(), signal(), or unmask(). Such operating-system calls can interfere with thread migration because the global process state does not migrate with the thread. In addition, you need to be careful with tasks such as opening file descriptors and using operating-system threads.