System call provide the interface between a
process and the operating system. Certain
system allow system calls to be made directly
from a higher level language program, the calls
normally resembles predefined functions or
subroutine calls. They may generate a call to a
special run-time routine that makes the system
calls, or the system call may be generated
directly in line. These calls generally available as
assembly language instructions.
Example:-
Consider that we have to write a program to
read data from one file and to copy them to
another file. The first input that the program
will need is the names of the two files the
input file and the output file. In an interactive
system this approach will require a sequence
of system calls first to write a prompting
message on the screen and then to read from
the keyboard the characters that define the
two files. After file names are obtained each
Of these operations require another system
calls and may encounter possible error
conditions.
X: Parameters
for call
Load address X
System call 13
Use Parameters
from table X
X
User Program
Operating System
System Call can be grouped
into five major categories
Process Control
File Management
Device Management
Information Maintenance
Communications
Process Control
END, ABORT
Load, Execute
Create Process, Terminate Process
Wait Event, Signed Event
Allocate and free memory
File Management
Create File, Delete File
Open , Close
Read, write, reposition
Get file attributes, set file attributes
Device Management
Request device, Release Device
Read, Write, Reposition
Get Device attributes, set device attributes
Logically attach or detach device
Information Maintenance
Get time or date, set time or date
Get system date, set system date
Get process, device attributes
Communications
Create, delete communications connections
Send, Receive message
Transfer status information
Attach or detach remote devices