Saturday 3 December 2016

System call categories

       System calls can be roughly grouped into five major categories:

  1. Process Control.
    1. load
    2. execute
    3. create process
    4. Terminate process
    5. get/set process attributes
    6. wait for time, wait event, signal event
    7. allocate, free memory
  2. File management.
    1. create file, delete file
    2. open, close
    3. read, write, reposition
    4. get/set file attributes
  3. Device Management.
    1. request device, release device
    2. read, write, reposition
    3. get/set device attributes
    4. logically attach or detach devices
  4. Information Maintenance.
    1. get/set time or date
    2. get/set system data
    3. get/set process, file, or device attributes
  5. Communication.
    1. create, delete communication connection
    2. send, receive messages
    3. transfer status information
    4. attach or detach remote devices
Processor mode and context switching
       A syscall is processed in kernel mode, which is accomplished by changing the processor execution mode to a more privileged one, but no process context switch is necessary.
       The hardware sees the world in terms of the execution mode according to the processor status register, and processes are an abstraction provided by the operating system.
       A syscall does not require a context switch to another process, it is processed in the context of whichever process invoked it. 

No comments:

Post a Comment