System Calls
Set of extended instructions provided by the operating system
System calls provide an interface between user program and operating system
Applied to various software objects like processes and files
Invoked by user programs to communicate with the
kernel
and request services
Library procedure corresponding to each system call
Machine registers to hold parameters of system call
Trap instruction (protected procedure call) to start OS
Hide details of trap and make system call look like ordinary procedure call
Return from trap instruction
Example
count = read ( file, buffer, nbytes );
Actual system call
read
invoked by
read
Number of bytes actually read is returned in
count
In case of error,
count
is set to -1