Skip to content
Related Articles

Related Articles

Improve Article

Introduction of System Call

  • Difficulty Level : Easy
  • Last Updated : 16 Aug, 2019

In computing, a system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system. A computer program makes a system call when it makes a request to the operating system’s kernel. System call provides the services of the operating system to the user programs via Application Program Interface(API). It provides an interface between a process and operating system to allow user-level processes to request services of the operating system. System calls are the only entry points into the kernel system. All programs needing resources must use system calls.

Services Provided by System Calls :

  1. Process creation and management
  2. Main memory management
  3. File Access, Directory and File system management
  4. Device handling(I/O)
  5. Protection
  6. Networking, etc.

    Types of System Calls : There are 5 different categories of system calls –

    1. Process control: end, abort, create, terminate, allocate and free memory.
    2. File management: create, open, close, delete, read file etc.
    3. Device management
    4. Information maintenance
    5. Communication

    Examples of Windows and Unix System Calls –



    WindowsUnix
    Process ControlCreateProcess()
    ExitProcess()
    WaitForSingleObject()
    fork()
    exit()
    wait()

    File Manipulation

    CreateFile()
    ReadFile()
    WriteFile()
    CloseHandle()
    open()
    read()
    write()
    close()
    Device ManipulationSetConsoleMode()
    ReadConsole()
    WriteConsole()
    ioctl()
    read()
    write()
    Information MaintenanceGetCurrentProcessID()
    SetTimer()
    Sleep()
    getpid()
    alarm()
    sleep()
    CommunicationCreatePipe()
    CreateFileMapping()
    MapViewOfFile()
    pipe()
    shmget()
    mmap()
    ProtectionSetFileSecurity()
    InitlializeSecurityDescriptor()
    SetSecurityDescriptorGroup()
    chmod()
    umask()
    chown()



    Reference –http://www.cs.columbia.edu/~jae/4118/L02-intro2-osc-ch2.pdf

    Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

     

    My Personal Notes arrow_drop_up
Recommended Articles
Page :