The Linux Kernel: System Calls M-R

Discussion in 'Linux Kernel' started by DevynCJohnson, Apr 20, 2014.

  1. DevynCJohnson

    DevynCJohnson Well-Known Member Staff Member Staff Writer

    Messages:
    1,313
    Likes Received:
    1,052
    Trophy Points:
    113
    Series Index - http://www.linux.org/threads/linux-kernel-reading-guide.5384/

    Aloha, here are some more system calls to discuss. Remember, this is not a complete list. Some syscalls have become obsolete and others are platform specific.

    mremap() - Memory REMAP is a syscall that remaps a virtual memory address. This means the kernel call gets a section of data and changes the size and location of that data's allocated area in memory.

    msync() - As many people may know, when a file is edited (for example, a plain text file), the file is loaded to memory and changes take place there. To save the changes to the hard-drive, msync() synchronizes the file on RAM with the older file on the hard-drive.

    nanosleep() - Like the sleep command commonly used in shell scripts, this command suspends execution on that thread. However, this command works on the nano-scale level.

    nfsservctl() - This is the interface for the NFS daemon.

    nice() - That commonly used and known command "nice" is another syscall.

    uname() - Here is yet another syscall that is sometimes used by the user in a command-line or script.

    open() - This syscall opens files.


    NOTE: Sometimes, the calling process is referred to as a local process and the other processes are remote. For instance, if both Firefox and Thunderbird are running on the same machine, Firefox refers to Thunderbird as a remote process as does Thunderbird to Firefox. Each process views themselves as local.

    pause() - This kernel call makes the calling process pause until one of two events take place. These two events are the death of the process (like a kill signal) or receiving a signal.

    pciconfig_iobase() - This call is used to get information about IO regions on memory.

    perf_event_open() - The system's performance is monitored when this syscall is executed.

    personality() - This syscall creates the process's execution domain. In computing, a personality is the way an executable behaves. This refers to the different system calls and application binary interfaces (ABI).

    perfmonctl() - This kernel call is the interface for the performance monitoring unit (PMU) of IA-64 CPUs.

    pipe() - This kernel call makes a pipe (|) which is a form of interprocess communication. This sends data from one process to another, and data does not go to the sender.

    pivot_root() - The root filesystem can be changed using this system call. pivot_root() is commonly used to change the root from initrd.

    poll() - This syscall watches file descriptors for ones that are ready for IO operations.

    pread() - With a given offset, pread() reads a file descriptor (fd).

    pwrite() - With a given offset, pwrite() writes to a file descriptor (fd).

    preadv() - This system call can read a file descriptor and fill many buffers. preadv() is like pread() and readv() combined.

    prlimit() - This is getrlimit() and setrlimit() combined into one syscall, so this one call gets and sets a process's resource limits.

    process_vm_readv() - This kernel call gets data from a specified process (by pid) and gives it to the calling process.

    process_vm_writev() - The calling process uses this syscall to send data to a remote process.

    pselect() - This is like poll(), watching for many file descriptors for one to be free for IO operations.

    ptrace() - A process can control and monitor another process (if permissions permit). The calling process is called the tracer and the process being monitored is called the tracee.

    pwritev() - This syscall has both the features of writev() and pwrite().

    query_module() - The information about a module can be received with this syscall.

    quotactl() - Disk quotas are managed with this syscall.

    read() - This system call gets data byte-by-byte from the specified file descriptor and places them in the buffer.

    readahead() - Files are placed in the page cache by this syscall.

    readlink() - Gets the full real pathname of the file the link points towards.

    reboot() - Obviously, this syscall reboots the system. When CAD is used (Ctrl+Alt+Del), this kernel call is executed.


    We are almost done discussing system calls. After I share more syscalls with you, then we will explain the different kinds of IDs (like PIDs, GIDs, etc.). If any of you have suggestions for future kernel articles, then please feel free to share your ideas with me here on Linux.org, on Google Plus, or via email (DevynCJohnson@Gmail.com).

    Attached Files:

    Last edited: May 11, 2014

Share This Page