UNIT 1 Part 5 User Interface and System Calls
UNIT 1 Part 5 User Interface and System Calls
Introduction and
Operating System Structures
Part 5 User and Operating system Interface & System Calls
MCA 3 Semester
rd
Laishram Darmoni
Project Associate
NIELIT IMPHAL
Operating System Structure
System call is the special function that is used by the process to request
action from the operating system which cannot be carried out by normal
function.
When the process is being run, if the process requires certain actions which
need to be carried out by Operating System, the process has to go call the
function which can interact with the kernel to complete the actions. This
special type of function call is known as System Calls in OS.
System calls provide the interface so that the process can
communicate with the Operating System.
• As we can see in the diagram, initially, the process pushes the parameter onto
the stack.
• After that, the read routine from the library is called, which puts the system call
code (unique code for each system call is assigned) into the register.
• Trap instruction is used which causes the transfer of control from user mode to
kernel mode.
• Kernel reads the system call code present in the register and finds out that the
system call is read, so the system call handler executes the read system call.
• After the execution of the read system call, the transfer is given back to the
user mode.
• The library routine (Library routine is nothing but the line of codes that forms
the library and the functions in that can be called by the process so that we
don't need to write the function every time. Eg. max function) in user mode
returns the output to the process which called it.
• On receiving the output, the process continues to execute the next instruction.