[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

General Programming Concepts: Writing and Debugging Programs


List of Processes Subroutines

With the introduction of threads in the operating system, several process subroutines have been extended and other subroutines have been added. Threads, not processes, are now the schedulable entity. For signals, the handler exists at the process level, but each thread can define a signal mask. Some examples of changed or new subroutines are: getprocs, getthrds, ptrace, getpri, setpri, yield and sigprocmask.

The subroutines are listed in the following categories:

Process Initiation


exec:, execl, execv, execle, execve, execlp, execvp, or exect
  Execute new programs in the calling process
fork or vfork Create a new process
reboot Restarts the system
siginterrupt Sets subroutines to restart when they are interrupted by specific signals

Process Suspension


pause Suspends a process until that process receives a signal
wait, wait3, waitpid Suspend a process until a child process stops or terminates

Process Termination


abort Terminates current process and produces a memory dump by sending a SIGOT signal
exit, atexit, or _exit Terminate a process
kill or killpg Terminate current process or group of processes with a signal

Process and Thread Identification


ctermid Gets the path name for the terminal that controls the current process
cuserid Gets the alphanumeric user name associated with the current process
getpid, getpgrp, or getppid Get the process ID, process group ID, or the parent process ID, respectively
getprocs Gets process table entries
getthrds Gets thread table entries
setpgid or setpgrp Set the process group ID
setsid Creates a session and sets process group IDs
uname or unamex Gets the names of the current operating system

Process Accounting


acct Enables and disables process accounting
ptrace Traces the execution of a process

Process Resource Allocation


brk or sbrk Change data segment space allocation
getdtablesize Gets the descriptor table size
getrlimit, setrlimit, or vlimit Limit the use of system resources by current process
getrusage, times, or vtimes Display information about resource use
plock Locks processes, text, and data into memory
profil Starts and stops program address sampling for execution profiling
ulimit Sets user process limits

Process Prioritization


getpri Returns the scheduling priority of a process
getpriority, setpriority, or nice Get or set the priority value of a process
setpri Sets a process scheduling priority to a constant value
yield Yields the processor to processes with higher priorities

Process and Thread Synchronization


compare_and_swap Conditionally updates or returns a single word variable atomically
fetch_and_add Updates a single word variable atomically
fetch_and_and and fetch_and_or Sets or clears bits in a single word variable atomically
semctl Controls semaphore operations
semget Gets a set of semaphores
semop Performs semaphore operations

Process Signals and Masks


raise Sends a signal to an executing program
sigaction, sigvec, or signal Specifies the action to take upon delivery of a signal
sigemptyset, sigfillset, sigaddset, sigdelset, or sigismember
  Create and manipulate signal masks
sigpending Determines the set of signals that are blocked from delivery
sigprocmask, sigsetmask, or sigblock Set signal masks
sigset, sighold, sigrelse, or sigignore Enhance the signal facility and provide signal management
sigsetjmp or siglongjmp Save and restore stack context and signal masks
sigstack Sets signal stack context
sigsuspend Changes the set of blocked signals
ssignal or gsignal Implement a software signal facility

Process Messages


msgctl Provides message control operations
msgget Displays a message queue identifier
msgrcv Reads messages from a queue
msgsnd Sends messages to the message queue
msgxrcv Receives an extended message
psignal Printing system signal messages


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]