Linux Assemblycollection of fast libraries

Process management system calls

Processes are the most fundamental abstraction in a Linux system, after files. As object code in execution - active, alive, running programs - processes are more than just assembly language; they consist of data, resources, state, and a virtualized computer.

Linux took an interesting path, one seldom traveled, and separated the act of reating a new process from the act of loading a new binary image. Although the two tasks are performed in tandem most of the time, the division has allowed a great deal of freedom for experimenta tion and evolution for each of the tasks. This road less traveled has survived to this day, and while most operating systems offer a single system call to start up a new program, Linux requires two: a fork and an exec.


Tip: For detailed information about each system call please read: Linux man pages

Creation and termination

CLONE56Create a child process
FORK57Create a child process
VFORK58Create a child process and block parent
EXECVE59Execute program
EXECVEAT322Execute program relative to a directory file descriptor
EXIT60Terminate the calling process
EXIT_GROUP231Terminate all threads in a process
WAIT461Wait for process to change state
WAITID247Wait for process to change state

Pocess id

GETPID39Get process ID
GETPPID110Get parent process ID
GETTID186Get thread ID

Session id

SETSID112Set session ID
GETSID124Get session ID

Process group id

SETPGID109Set process group ID
GETPGID121Get process group ID
GETPGRP111Get the process group ID of the calling process

Users and groups

SETUID105Set real user ID
GETUID102Get real user ID
SETGID106Set real group ID
GETGID104Get real group ID
SETRESUID117Set real, effective and saved user IDs
GETRESUID118Get real, effective and saved user IDs
SETRESGID119Set real, effective and saved group IDs
GETRESGID120Get real, effective and saved group IDs
SETREUID113Set real and/or effective user ID
SETREGID114Set real and/or effective group ID
SETFSUID122Set user ID used for file system checks
SETFSGID123Set group ID used for file system checks
GETEUID107Get effective user ID
GETEGID108Get effective group ID
SETGROUPS116Set list of supplementary group IDs
GETGROUPS115Get list of supplementary group IDs


SETNS308Reassociate thread with a namespace

Resource limits

SETRLIMIT160Set resource limits
GETRLIMIT97Get resource limits
PRLIMIT302Set and get the resource limits of an arbitrary process
GETRUSAGE98Get resource usage

Process scheduling

SCHED_SETATTR314Set scheduling policy and attributes
SCHED_GETATTR315Get scheduling policy and attributes
SCHED_SETSCHEDULER144Set scheduling policy/parameters
SCHED_GETSCHEDULER145Get scheduling policy/parameters
SCHED_SETPARAM142Set scheduling parameters
SCHED_GETPARAM143Get scheduling parameters
SCHED_SETAFFINITY203Set a process's CPU affinity mask
SCHED_GETAFFINITY204Get a process's CPU affinity mask
SCHED_GET_PRIORITY_MAX146Get static priority range (max value)
SCHED_GET_PRIORITY_MIN147Get static priority range (min value)
SCHED_RR_GET_INTERVAL148Get the SCHED_RR interval for the named process
SCHED_YIELD24Yield the processor
SETPRIORITY141Set program scheduling priority
GETPRIORITY140Get program scheduling priority
IOPRIO_SET251Set I/O scheduling class and priority
IOPRIO_GET252Get I/O scheduling class and priority

Virtual memory

BRK12Change data segment size
MMAP9Map files or devices into memory
MUNMAP11Unmap files or devices into memory
MREMAP25Remap a virtual memory address
MPROTECT10Set protection on a region of memory
MADVISE28Give advice about use of memory
MLOCK149Lock part of the calling process's virtual address space into RAM
MLOCK2325Lock part of the calling process's virtual address space into RAM
MLOCKALL151Lock all of the calling process's virtual address space into RAM
MUNLOCK150Unlock part of the calling process's virtual address space into RAM
MUNLOCKALL152Unlock all of the calling process's virtual address space into RAM
MINCORE27Determine whether pages are resident in memory
MEMBARRIER324Issue memory barriers on a set of threads
MODIFY_LDT154Reads or writes the local descriptor table (ldt) for a process


CAPSET126Set capabilities of thread(s)
CAPGET125Get capabilities of thread(s)
SET_THREAD_AREA205Set a thread local storage (TLS) area
GET_THREAD_AREA211Get a thread-local storage (TLS) area
SET_TID_ADDRESS218Set pointer to thread ID
ARCH_PRCTL158Set architecture-specific thread state


USELIB134Load shared library
PRCTL157Operations on a process
SECCOMP317Operate on Secure Computing state of the process
PTRACE101Process trace
PROCESS_VM_READV310Transfers data from the remote process to the local process
PROCESS_VM_WRITEV311Transfers data from the local process to the remote process
KCMP312Compare two processes to determine if they share a kernel resource
UNSHARE272Disassociate parts of the process execution context
Copyright 2012-2018 Jack Black. All rights reserved.